java.beans
public class PropertyEditorSupport extends Object implements PropertyEditor
This class does not do any painting or actual editing. For that, you must use or extend it. See the PropertyEditor class for better descriptions of what the various methods do.
Since: 1.1
UNKNOWN: updated to 1.5
Constructor Summary | |
---|---|
PropertyEditorSupport() Call this constructor when you are deriving from
PropertyEditorSupport.
| |
PropertyEditorSupport(Object source) Call this constructor when you are using
PropertyEditorSupport as a helper object.
|
Method Summary | |
---|---|
void | addPropertyChangeListener(PropertyChangeListener l) Adds a property change listener to this property editor.
|
void | firePropertyChange() Notifies people that we've changed, although we don't
tell them just how. |
String | getAsText() Gets the value as text.
|
Component | getCustomEditor() Returns a custom component to edit the value.
|
String | getJavaInitializationString() Gets the Java initialization String for the current
value of the Object. |
Object | getSource() Returns the bean that is used as the source of events.
|
String[] | getTags() Returns a list of possible choices for the value.
|
Object | getValue() Gets the current value of the property.
|
boolean | isPaintable() Gets whether this object is paintable or not.
|
void | paintValue(Graphics g, Rectangle r) Paints this object. |
void | removePropertyChangeListener(PropertyChangeListener l) Removes a property change listener from this property editor.
|
void | setAsText(String s) Sets the value as text.
|
void | setSource(Object source) Sets the bean that is used as the source of events
when property changes occur.
|
void | setValue(Object newValue) Sets the current value of the property and a property change
event is fired to all registered PropertyChangeListener instances.
|
boolean | supportsCustomEditor() Finds out whether this property editor supports a
custom component to edit its value.
|
Since: 1.5
UNKNOWN: this was protected
prior to 1.5
source
is null
,
for compatibility reasons with J2SDK 1.5.0 .
Parameters: source The source to use when firing property change events.
Since: 1.5
UNKNOWN: this was protected
prior to 1.5
Parameters: l the listener to add.
Returns: the value as text.
Returns: null
in this class.
Implementation Note: This class returns the string "@$#^" to make sure the code will be broken, so that you will know to override it when you create your own property editor.
Returns: the Java initialization string.
Returns: The event source object
Since: 1.5
Returns: null
Returns: the current value of the property.
Returns: false
Parameters: l the listener to remove.
Parameters: s the text to convert to a new value.
Throws: IllegalArgumentException if the text is malformed.
PropertyEditor
.
Parameters: source
Since: 1.5
Parameters: newValue The new value for the property.
Returns: false
in this class.