Package org.jfree.beans.editors
Class PaintEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- org.jfree.beans.editors.PaintEditor
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.beans.PropertyEditor
,java.util.EventListener
public class PaintEditor extends java.beans.PropertyEditorSupport implements java.beans.PropertyChangeListener
A JavaBeans property editor forPaint
instances. Obviously, we can't provide editing for every type ofPaint
, but we'll try to coverPaint
andGradientPaint
.
-
-
Constructor Summary
Constructors Constructor Description PaintEditor()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Component
getCustomEditor()
Returns a component for editing aPaint
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()
Returnstrue
to indicate that we provide a custom editor via thegetCustomEditor()
method.
-
-
-
Constructor Detail
-
PaintEditor
public PaintEditor()
Creates a new instance.
-
-
Method Detail
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
isPaintable
public boolean isPaintable()
- Specified by:
isPaintable
in interfacejava.beans.PropertyEditor
- Overrides:
isPaintable
in classjava.beans.PropertyEditorSupport
-
paintValue
public void paintValue(java.awt.Graphics g, java.awt.Rectangle clipRect)
- Specified by:
paintValue
in interfacejava.beans.PropertyEditor
- Overrides:
paintValue
in classjava.beans.PropertyEditorSupport
-
getValue
public java.lang.Object getValue()
- Specified by:
getValue
in interfacejava.beans.PropertyEditor
- Overrides:
getValue
in classjava.beans.PropertyEditorSupport
-
setValue
public void setValue(java.lang.Object value)
- Specified by:
setValue
in interfacejava.beans.PropertyEditor
- Overrides:
setValue
in classjava.beans.PropertyEditorSupport
-
getJavaInitializationString
public java.lang.String getJavaInitializationString()
Returns a string for the property value.- Specified by:
getJavaInitializationString
in interfacejava.beans.PropertyEditor
- Overrides:
getJavaInitializationString
in classjava.beans.PropertyEditorSupport
- Returns:
- A string for the property value.
-
getCustomEditor
public java.awt.Component getCustomEditor()
Returns a component for editing aPaint
instance.- Specified by:
getCustomEditor
in interfacejava.beans.PropertyEditor
- Overrides:
getCustomEditor
in classjava.beans.PropertyEditorSupport
- Returns:
- A component for editing.
-
supportsCustomEditor
public boolean supportsCustomEditor()
Returnstrue
to indicate that we provide a custom editor via thegetCustomEditor()
method.- Specified by:
supportsCustomEditor
in interfacejava.beans.PropertyEditor
- Overrides:
supportsCustomEditor
in classjava.beans.PropertyEditorSupport
- Returns:
true
.
-
-