public class UnitsHandler extends BaseHandler
Constructor and Description |
---|
UnitsHandler()
ConfigurationHandler for Units values.
|
Modifier and Type | Method and Description |
---|---|
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)
Returns a JTextField.
|
canHandle, getRenderer, toString
public java.awt.Component getEditor(java.lang.Object o, ConfigurationChangeListener listener, javax.swing.JComponent parent)
BaseHandler
getEditor
in interface ConfigurationHandler
getEditor
in class BaseHandler
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 componentConfigurationHandler.getEditor(java.lang.Object, ConfigurationChangeListener, JComponent)
public java.lang.Object fromString(java.lang.String s)
fromString
in interface ConfigurationHandler
fromString
in class BaseHandler
s
- A String representation of an object, eg from toString(o) or user
inputConfigurationHandler.fromString(java.lang.String)
public java.lang.Object getDefaultValue(java.lang.Class<?> c)
c
- A class for which canHandle(c) == trueConfigurationHandler.getDefaultValue(java.lang.Class)