01: /*
02: * Created on 26 avr. 2005
03: *
04: */
05: package org.openwfe.gpe.model;
06:
07: import org.eclipse.ui.views.properties.IPropertyDescriptor;
08: import org.eclipse.ui.views.properties.TextPropertyDescriptor;
09:
10: /**
11: * @author Christelle
12: *
13: */
14: public class SaveElement extends NoChild {
15:
16: public static String name = "Save";
17: private String toVariable = "";
18:
19: protected static IPropertyDescriptor[] descriptors;
20:
21: public static final String TOVARIABLE = "to-variable";
22:
23: static {
24: descriptors = new IPropertyDescriptor[] { new TextPropertyDescriptor(
25: TOVARIABLE, "to-variable"), };
26: }
27:
28: public String getName() {
29: return name;
30: }
31:
32: public void setName(String s) {
33: name = s;
34: }
35:
36: public String getToVariable() {
37: return toVariable;
38: }
39:
40: public void setToVariable(String s) {
41: toVariable = s;
42: firePropertyChange(TOVARIABLE, null, s);
43: }
44:
45: public IPropertyDescriptor[] getPropertyDescriptors() {
46: return descriptors;
47: }
48:
49: public Object getPropertyValue(Object propName) {
50: if (TOVARIABLE.equals(propName))
51: return getToVariable();
52: return super .getPropertyValue(propName);
53: }
54:
55: public void setPropertyValue(Object id, Object value) {
56: if (id == TOVARIABLE)
57: setToVariable((String) value);
58:
59: }
60:
61: }
|