public class PaintEditor extends java.beans.PropertyEditorSupport implements java.beans.PropertyChangeListener
Paint instances. Obviously, we
can't provide editing for every type of Paint, but we'll try
to cover Paint and GradientPaint.| Constructor and Description |
|---|
PaintEditor()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.Component |
getCustomEditor()
Returns a component for editing a
Paint instance. |
java.lang.String |
getJavaInitializationString()
Returns a string for the property value.
|
java.lang.Object |
getValue() |
boolean |
isPaintable() |
void |
paintValue(java.awt.Graphics g,
java.awt.Rectangle clipRect) |
void |
propertyChange(java.beans.PropertyChangeEvent evt) |
void |
setValue(java.lang.Object value) |
boolean |
supportsCustomEditor()
Returns
true to indicate that we provide a custom editor
via the getCustomEditor() method. |
public PaintEditor()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpublic boolean isPaintable()
isPaintable in interface java.beans.PropertyEditorisPaintable in class java.beans.PropertyEditorSupportpublic void paintValue(java.awt.Graphics g, java.awt.Rectangle clipRect)
paintValue in interface java.beans.PropertyEditorpaintValue in class java.beans.PropertyEditorSupportpublic java.lang.Object getValue()
getValue in interface java.beans.PropertyEditorgetValue in class java.beans.PropertyEditorSupportpublic void setValue(java.lang.Object value)
setValue in interface java.beans.PropertyEditorsetValue in class java.beans.PropertyEditorSupportpublic java.lang.String getJavaInitializationString()
getJavaInitializationString in interface java.beans.PropertyEditorgetJavaInitializationString in class java.beans.PropertyEditorSupportpublic java.awt.Component getCustomEditor()
Paint instance.getCustomEditor in interface java.beans.PropertyEditorgetCustomEditor in class java.beans.PropertyEditorSupportpublic boolean supportsCustomEditor()
true to indicate that we provide a custom editor
via the getCustomEditor() method.supportsCustomEditor in interface java.beans.PropertyEditorsupportsCustomEditor in class java.beans.PropertyEditorSupporttrue.