KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > suberic > util > gui > propedit > PropertyEditorUI


1 package net.suberic.util.gui.propedit;
2 import net.suberic.util.VariableBundle;
3
4 /**
5  * An interface which defines a way of editing a property.
6  */

7 public interface PropertyEditorUI {
8
9   /**
10    * This configures an editor for the given propertyName using the
11    * PropertyManager mgr.
12    *
13    * This version usees the template property to definte all things about
14    * the editor for propertyName. This is useful if you want to be able
15    * to edit, for instace, the properties of a particular user:
16    *
17    * UserProfile.userOne.showHeaders
18    * UserProfile.userTwo.showHeaders
19    *
20    * UserProfile.showHeaders.propertyType=boolean
21    *
22    * So you can use this just to call configureEditor(factory,
23    * "UserProfile.userOne.showHeaders", "UserProfile.showHeaders", mgr,
24    * true)
25    *
26    * @param propertyName The property to be edited.
27    * @param template The property that will define the layout of the
28    * editor.
29    * @param propertyBase The property that is used for any relative
30    * property resolutions.
31    * @param manager The PropertyEditorManager that will manage the
32    * changes.
33    */

34   public void configureEditor(String JavaDoc propertyName, String JavaDoc template, String JavaDoc propertyBase, PropertyEditorManager manager);
35
36   /**
37    * This configures an editor for the given propertyName using the
38    * PropertyManager mgr.
39    *
40    * This version usees the template property to definte all things about
41    * the editor for propertyName. This is useful if you want to be able
42    * to edit, for instace, the properties of a particular user:
43    *
44    * UserProfile.userOne.showHeaders
45    * UserProfile.userTwo.showHeaders
46    *
47    * UserProfile.showHeaders.propertyType=boolean
48    *
49    * So you can use this just to call configureEditor(factory,
50    * "UserProfile.userOne.showHeaders", "UserProfile.showHeaders", mgr,
51    * true)
52    *
53    * @param propertyName The property to be edited.
54    * @param template The property that will define the layout of the
55    * editor.
56    * @param manager The PropertyEditorManager that will manage the
57    * changes.
58    */

59   public void configureEditor(String JavaDoc propertyName, String JavaDoc template, PropertyEditorManager manager);
60
61   /**
62    * This configures an editor for the given propertyName in the
63    * PropertyEditorManager mgr.
64    * @param propertyName The property to be edited. This will also be
65    * used for the editor layout.
66    * @param manager The PropertyEditorManager that will manage the
67    * changes.
68    */

69   public void configureEditor(String JavaDoc propertyName, PropertyEditorManager mgr);
70
71   /**
72    * Returns the currently edited property.
73    */

74   public String JavaDoc getProperty();
75
76   /**
77    * Returns the template for the current property.
78    */

79   public String JavaDoc getEditorTemplate();
80
81   /**
82    * This writes the currently configured value in the PropertyEditorUI
83    * to the source VariableBundle.
84    */

85   public void setValue() throws PropertyValueVetoException;
86
87   /**
88    * This checks that the currently configured value is valid.
89    */

90   public void validateProperty() throws PropertyValueVetoException;
91
92   /**
93    * This resets the editor to the original (or latest set, if setValue()
94    * has been called) value of the edited property.
95    */

96   public void resetDefaultValue() throws PropertyValueVetoException;
97
98   /**
99    * Sets the original value of the editor.
100    */

101   public void setOriginalValue(String JavaDoc pOriginalValue);
102
103   /**
104    * Returns the current values of the edited properties as a
105    * java.util.Properties object.
106    */

107   public java.util.Properties JavaDoc getValue();
108
109   /**
110    * Adds a disable mask to the PropertyEditorUI.
111    */

112   public void addDisableMask(Object JavaDoc key);
113
114   /**
115    * Removes the disable mask keyed by this Object.
116    */

117   public void removeDisableMask(Object JavaDoc key);
118
119   /**
120    * Returns whether or not this Editor is currently enabled.
121    */

122   public boolean isEditorEnabled();
123
124   /**
125    * Returns the PropertyEditorManager for this PropertyEditorUI.
126    */

127   public PropertyEditorManager getManager();
128
129   /**
130    * Adds a PropertyEditorListener to the ListenerList.
131    */

132   public void addPropertyEditorListener(PropertyEditorListener pel);
133
134   /**
135    * Removes a PropertyEditorListener from the ListenerList.
136    */

137   public void removePropertyEditorListener(PropertyEditorListener pel);
138
139   /**
140    * Returns the helpId for this editor.
141    */

142   public String JavaDoc getHelpID();
143
144   /**
145    * Returns the display value for this property.
146    */

147   public String JavaDoc getDisplayValue();
148
149   /**
150    * Removes the PropertyEditor.
151    */

152   public void remove();
153 }
154
Popular Tags