114 |
** wrapper type. |
** wrapper type. |
115 |
** @param value the value to set this property to. |
** @param value the value to set this property to. |
116 |
**/ |
**/ |
117 |
public abstract void setValue(Object value); |
void setValue(Object value); |
118 |
|
|
119 |
/** Accessor method to get the current value the PropertyEditor is working with. |
/** Accessor method to get the current value the PropertyEditor is working with. |
120 |
** If the property type is native, it will be wrapped in the appropriate |
** If the property type is native, it will be wrapped in the appropriate |
121 |
** wrapper type. |
** wrapper type. |
122 |
** @return the current value of the PropertyEditor. |
** @return the current value of the PropertyEditor. |
123 |
**/ |
**/ |
124 |
public abstract Object getValue(); |
Object getValue(); |
125 |
|
|
126 |
|
|
127 |
/** Set the value of this property using a String. |
/** Set the value of this property using a String. |
130 |
** @param text the text to set it to. |
** @param text the text to set it to. |
131 |
** @exception IllegalArgumentException if the String is in the wrong format or setAsText() is not supported. |
** @exception IllegalArgumentException if the String is in the wrong format or setAsText() is not supported. |
132 |
**/ |
**/ |
133 |
public abstract void setAsText(String text) throws IllegalArgumentException; |
void setAsText(String text) throws IllegalArgumentException; |
134 |
|
|
135 |
/** Get the value of this property in String format. |
/** Get the value of this property in String format. |
136 |
** Many times this can simply use Object.toString().<P> |
** Many times this can simply use Object.toString().<P> |
139 |
** getAsText() should be able to go into setAsText(). |
** getAsText() should be able to go into setAsText(). |
140 |
** @return the value of this property in String format. |
** @return the value of this property in String format. |
141 |
**/ |
**/ |
142 |
public abstract String getAsText(); |
String getAsText(); |
143 |
|
|
144 |
/** Get a list of possible Strings which this property type can have. |
/** Get a list of possible Strings which this property type can have. |
145 |
** The value of these will be used by the RAD tool to construct some sort |
** The value of these will be used by the RAD tool to construct some sort |
149 |
** must check the value in setAsText() anyway. |
** must check the value in setAsText() anyway. |
150 |
** @return the list of possible String values for this property type. |
** @return the list of possible String values for this property type. |
151 |
**/ |
**/ |
152 |
public abstract String[] getTags(); |
String[] getTags(); |
153 |
|
|
154 |
|
|
155 |
/** The RAD tool calls this to find out whether the PropertyEditor can paint itself. |
/** The RAD tool calls this to find out whether the PropertyEditor can paint itself. |
156 |
** @return true if it can paint itself graphically, false if it cannot. |
** @return true if it can paint itself graphically, false if it cannot. |
157 |
**/ |
**/ |
158 |
public abstract boolean isPaintable(); |
boolean isPaintable(); |
159 |
|
|
160 |
/** The RAD tool calls this to paint the actual value of the property. |
/** The RAD tool calls this to paint the actual value of the property. |
161 |
** The Graphics context will have the same current font, color, etc. as the |
** The Graphics context will have the same current font, color, etc. as the |
165 |
** @param g the Graphics context to paint on |
** @param g the Graphics context to paint on |
166 |
** @param bounds the rectangle you have reserved to work in |
** @param bounds the rectangle you have reserved to work in |
167 |
**/ |
**/ |
168 |
public abstract void paintValue(java.awt.Graphics g, java.awt.Rectangle bounds); |
void paintValue(java.awt.Graphics g, java.awt.Rectangle bounds); |
169 |
|
|
170 |
|
|
171 |
/** The RAD tool calls this to find out whether the PropertyEditor supports a custom component to edit and display itself. |
/** The RAD tool calls this to find out whether the PropertyEditor supports a custom component to edit and display itself. |
172 |
** @return true if getCustomEditor() will return a component, false if not. |
** @return true if getCustomEditor() will return a component, false if not. |
173 |
**/ |
**/ |
174 |
public abstract boolean supportsCustomEditor(); |
boolean supportsCustomEditor(); |
175 |
|
|
176 |
/** The RAD tool calls this to grab the component that can edit this type. |
/** The RAD tool calls this to grab the component that can edit this type. |
177 |
** The component may be painted anywhere the RAD tool wants to paint it-- |
** The component may be painted anywhere the RAD tool wants to paint it-- |
180 |
** change to the value is made, fire a PropertyChangeEvent to the source.<P> |
** change to the value is made, fire a PropertyChangeEvent to the source.<P> |
181 |
** @return the custom editor for this property type. |
** @return the custom editor for this property type. |
182 |
**/ |
**/ |
183 |
public abstract java.awt.Component getCustomEditor(); |
java.awt.Component getCustomEditor(); |
184 |
|
|
185 |
|
|
186 |
/** Adds a property change listener to this PropertyEditor. |
/** Adds a property change listener to this PropertyEditor. |
187 |
** @param listener the listener to add |
** @param listener the listener to add |
188 |
**/ |
**/ |
189 |
public abstract void addPropertyChangeListener(PropertyChangeListener listener); |
void addPropertyChangeListener(PropertyChangeListener listener); |
190 |
|
|
191 |
/** Removes a property change listener from this PropertyEditor. |
/** Removes a property change listener from this PropertyEditor. |
192 |
** @param listener the listener to remove |
** @param listener the listener to remove |
193 |
**/ |
**/ |
194 |
public abstract void removePropertyChangeListener(PropertyChangeListener listener); |
void removePropertyChangeListener(PropertyChangeListener listener); |
195 |
|
|
196 |
/** Get a Java language-specific String which could be used to create an Object |
/** Get a Java language-specific String which could be used to create an Object |
197 |
** of the specified type. Every PropertyEditor must support this.<P> |
** of the specified type. Every PropertyEditor must support this.<P> |
205 |
** </OL> |
** </OL> |
206 |
** @return the initialization string for this object in Java. |
** @return the initialization string for this object in Java. |
207 |
**/ |
**/ |
208 |
public abstract String getJavaInitializationString(); |
String getJavaInitializationString(); |
209 |
} |
} |