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 UnsetElement extends NoChild {
15:
16: public static String name = "Unset";
17: private String variable = "";
18:
19: protected static IPropertyDescriptor[] descriptors;
20:
21: public static final String VARIABLE = "variable";
22: static {
23: descriptors = new IPropertyDescriptor[] {
24:
25: new TextPropertyDescriptor(VARIABLE, "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 getVariable() {
37: return variable;
38: }
39:
40: public void setVariable(String s) {
41: variable = s;
42: firePropertyChange(VARIABLE, null, s);
43: }
44:
45: public IPropertyDescriptor[] getPropertyDescriptors() {
46: return descriptors;
47: }
48:
49: public Object getPropertyValue(Object propName) {
50: if (VARIABLE.equals(propName))
51: return getVariable();
52: return super .getPropertyValue(propName);
53: }
54:
55: public void setPropertyValue(Object id, Object value) {
56: if (id == VARIABLE)
57: setVariable((String) value);
58: }
59:
60: }
|