public class ClassEditor extends PropertyEditorSupport
Constructor and Description |
---|
ClassEditor() |
Modifier and Type | Method and Description |
---|---|
String |
getAsText() |
String |
getJavaInitializationString()
This method is intended for use when generating Java code to set
the value of the property.
|
void |
setAsText(String text)
Set the property value by parsing a given String.
|
addPropertyChangeListener, firePropertyChange, getCustomEditor, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
public String getJavaInitializationString()
Example results are "2", "new Color(127,127,34)", "Color.orange", etc.
getJavaInitializationString
in interface PropertyEditor
getJavaInitializationString
in class PropertyEditorSupport
public String getAsText()
getAsText
in interface PropertyEditor
getAsText
in class PropertyEditorSupport
Returns null if the value can't be expressed as an editable string.
If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().
public void setAsText(String text) throws IllegalArgumentException
setAsText
in interface PropertyEditor
setAsText
in class PropertyEditorSupport
text
- The string to be parsed.IllegalArgumentException