1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.g3d.property;
14 public class StringPropertyManipulator implements PropertyManipulator {
16 ValueProvider provider;
20 String editValue = null;
22 public StringPropertyManipulator(ValueProvider provider, Object input) {
23 this.provider = provider;
28 public int getValueCount() {
33 public String getDescription(int i) {
40 public String getValue(int i) {
44 Object o = provider.getValue(input);
48 } catch (Exception e) {
54 public String setValue(String value, int i) {
57 provider.setValue(input, value);
58 } catch (Exception e) {
59 return e.getMessage();
65 public boolean getEditMode() {
70 public void setEditMode(boolean b) {
74 editValue = provider.getValue(input).toString();
75 } catch (Exception e) {