org.grinvin.params
Interface ParameterEditor
public interface ParameterEditor
Helper object for editing parameter values of a certain type. This type is
only implicitely associated to this editor. Knows how to
convert values from and to a textual representation and how to
delegate parameter value editing to an
appropriate
ParameterComponent
.
Object | fromText(String string) - Convert the given string to a parameter value.
|
ParameterComponent | getEditorComponent() - Return a stand alone component which can be used to edit a parameter
of the type which is implicitely associated with this editor.
|
String | toText(Object value) - Convert the given parameter value to a textual representation.
|
fromText
public Object fromText(String string)
Convert the given string to a parameter value. The resulting object
belongs to the type which is implicitely associated with this editor.
getEditorComponent
public ParameterComponent getEditorComponent()
Return a stand alone component which can be used to edit a parameter
of the type which is implicitely associated with this editor.
This component should be an extension of
java.awt.Component
or preferably of
javax.swing.JComponent
.
toText
public String toText(Object value)
Convert the given parameter value to a textual representation. May throw
an exception when the given value does not belong to the type which is
implicitely associated with this editor.