public abstract class EnumPropertyEditor extends Object implements PropertyEditor
Modifier | Constructor and Description |
---|---|
protected |
EnumPropertyEditor(Class<? extends Enum> baseClass,
boolean allowNull) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Register a listener for the PropertyChange event.
|
String |
getAsText() |
Component |
getCustomEditor()
A PropertyEditor may choose to make available a full custom Component that edits its property value.
|
String |
getJavaInitializationString()
Returns a fragment of Java code that can be used to set a property to match the editors current state.
|
String[] |
getTags() |
Object |
getValue() |
boolean |
isPaintable()
Determines whether this property editor is paintable.
|
void |
paintValue(Graphics gfx,
Rectangle box)
Paint a representation of the value into a given area of screen real estate.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener for the PropertyChange event.
|
void |
setAsText(String text) |
void |
setValue(Object value) |
boolean |
supportsCustomEditor()
Determines whether this property editor supports a custom editor.
|
public Object getValue()
getValue
in interface PropertyEditor
public void setValue(Object value)
setValue
in interface PropertyEditor
public String getAsText()
getAsText
in interface PropertyEditor
public void setAsText(String text) throws IllegalArgumentException
setAsText
in interface PropertyEditor
IllegalArgumentException
public String[] getTags()
getTags
in interface PropertyEditor
public boolean isPaintable()
isPaintable
in interface PropertyEditor
public void paintValue(Graphics gfx, Rectangle box)
paintValue
in interface PropertyEditor
gfx
- Graphics object to paint into.box
- Rectangle within graphics object into which we should paint.public String getJavaInitializationString()
2
new
java.awt.Color(127,127,34)
java.awt.Color.orange
javax.swing.Box.createRigidArea(new java.awt.Dimension(0, 5))
getJavaInitializationString
in interface PropertyEditor
;
') to end the expression.public Component getCustomEditor()
getCustomEditor
in interface PropertyEditor
public boolean supportsCustomEditor()
supportsCustomEditor
in interface PropertyEditor
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface PropertyEditor
listener
- An object to be invoked when a PropertyChange event is fired.public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface PropertyEditor
listener
- The PropertyChange listener to be removed.Copyright © 2017 Hitachi Vantara. All rights reserved.