public interface ConfigurationHandler
Manages configuration of Property
s of of a certain Class.
A ConfigurationHandler provides default property values as well as user interface
components that can be used to display and edit a Property.
Not all classes need a ConfigurationHandler. If a Property value does not have an associated handler, then a property editor must create a Configuration for it based on its accessor methods. This Configuration may in turn include property values for which there is no ConfigurationHandler, so that a tree of Configurations results. The leaves of this tree are the values with ConfigurationHandlers.
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(java.lang.Class<?> c) |
java.lang.Object |
fromString(java.lang.String s) |
java.lang.Object |
getDefaultValue(java.lang.Class<?> c) |
java.awt.Component |
getEditor(java.lang.Object o,
ConfigurationChangeListener listener,
javax.swing.JComponent parent) |
java.awt.Component |
getRenderer(java.lang.Object o) |
java.lang.String |
toString(java.lang.Object o) |
boolean canHandle(java.lang.Class<?> c)
c
- A Classjava.awt.Component getRenderer(java.lang.Object o)
o
- An object for which canHandle(o.getClass()) == truejava.awt.Component getEditor(java.lang.Object o, ConfigurationChangeListener listener, javax.swing.JComponent parent)
o
- An object for which canHandle(o.getClass()) == truelistener
- An ActionListener. The returned editor component must 1) add this listener
to the part of itself that produces an event when editing is complete, and 2) call
setProxy() with an EditorProxy through which the listener can retrieve a
new object value when editing is completeparent
- Parent componentjava.lang.String toString(java.lang.Object o)
o
- An object for which canHandle(o.getClass()) == truejava.lang.Object fromString(java.lang.String s)
s
- A String representation of an object, eg from toString(o) or user
inputjava.lang.Object getDefaultValue(java.lang.Class<?> c)
c
- A class for which canHandle(c) == true