|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.beans.PropertyEditorSupport
org.jdesktop.swingx.editors.Paint2PropertyEditor
public class Paint2PropertyEditor
Constructor Summary | |
---|---|
Paint2PropertyEditor()
Creates a new instance of Paint2PropertyEditor |
Method Summary | |
---|---|
String |
getAsText()
Gets the property value as a string suitable for presentation to a human to edit. |
Component |
getCustomEditor()
A PropertyEditor may chose to make available a full custom Component that edits its property value. |
String |
getJavaInitializationString()
This method is intended for use when generating Java code to set the value of the property. |
Paint |
getValue()
Gets the value of the property. |
boolean |
isPaintable()
Determines whether the class will honor the painValue method. |
void |
paintValue(Graphics g,
Rectangle box)
Paint a representation of the value into a given area of screen real estate. |
void |
setAsText(String text)
Sets the property value by parsing a given String. |
void |
setValue(Object object)
Set (or change) the object that is to be edited. |
boolean |
supportsCustomEditor()
Determines whether the propertyEditor can provide a custom editor. |
Methods inherited from class java.beans.PropertyEditorSupport |
---|
addPropertyChangeListener, firePropertyChange, getSource, getTags, removePropertyChangeListener, setSource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Paint2PropertyEditor()
Method Detail |
---|
public Paint getValue()
java.beans.PropertyEditorSupport
getValue
in interface PropertyEditor
getValue
in class PropertyEditorSupport
public void setValue(Object object)
java.beans.PropertyEditorSupport
setValue
in interface PropertyEditor
setValue
in class PropertyEditorSupport
object
- The new target object to be edited. Note that this
object should not be modified by the PropertyEditor, rather
the PropertyEditor should create a new object to hold any
modified value.public String getJavaInitializationString()
java.beans.PropertyEditorSupport
Example results are "2", "new Color(127,127,34)", "Color.orange", etc.
getJavaInitializationString
in interface PropertyEditor
getJavaInitializationString
in class PropertyEditorSupport
public void setAsText(String text) throws IllegalArgumentException
java.beans.PropertyEditorSupport
setAsText
in interface PropertyEditor
setAsText
in class PropertyEditorSupport
text
- The string to be parsed.
IllegalArgumentException
public String getAsText()
java.beans.PropertyEditorSupport
getAsText
in interface PropertyEditor
getAsText
in class PropertyEditorSupport
Returns "null" is the value can't be expressed as a string.
If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().
public void paintValue(Graphics g, Rectangle box)
java.beans.PropertyEditorSupport
If the PropertyEditor doesn't honor paint requests (see isPaintable) this method should be a silent noop.
paintValue
in interface PropertyEditor
paintValue
in class PropertyEditorSupport
g
- Graphics object to paint into.box
- Rectangle within graphics object into which we should paint.public boolean isPaintable()
java.beans.PropertyEditorSupport
isPaintable
in interface PropertyEditor
isPaintable
in class PropertyEditorSupport
public boolean supportsCustomEditor()
java.beans.PropertyEditorSupport
supportsCustomEditor
in interface PropertyEditor
supportsCustomEditor
in class PropertyEditorSupport
public Component getCustomEditor()
java.beans.PropertyEditorSupport
The higher-level code that calls getCustomEditor may either embed the Component in some larger property sheet, or it may put it in its own individual dialog, or ...
getCustomEditor
in interface PropertyEditor
getCustomEditor
in class PropertyEditorSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |