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 forPaintinstances. Obviously, we can't provide editing for every type ofPaint, but we'll try to coverPaintandGradientPaint.
-
-
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.ComponentgetCustomEditor()Returns a component for editing aPaintinstance.java.lang.StringgetJavaInitializationString()Returns a string for the property value.java.lang.ObjectgetValue()booleanisPaintable()voidpaintValue(java.awt.Graphics g, java.awt.Rectangle clipRect)voidpropertyChange(java.beans.PropertyChangeEvent evt)voidsetValue(java.lang.Object value)booleansupportsCustomEditor()Returnstrueto 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:
propertyChangein interfacejava.beans.PropertyChangeListener
-
isPaintable
public boolean isPaintable()
- Specified by:
isPaintablein interfacejava.beans.PropertyEditor- Overrides:
isPaintablein classjava.beans.PropertyEditorSupport
-
paintValue
public void paintValue(java.awt.Graphics g, java.awt.Rectangle clipRect)
- Specified by:
paintValuein interfacejava.beans.PropertyEditor- Overrides:
paintValuein classjava.beans.PropertyEditorSupport
-
getValue
public java.lang.Object getValue()
- Specified by:
getValuein interfacejava.beans.PropertyEditor- Overrides:
getValuein classjava.beans.PropertyEditorSupport
-
setValue
public void setValue(java.lang.Object value)
- Specified by:
setValuein interfacejava.beans.PropertyEditor- Overrides:
setValuein classjava.beans.PropertyEditorSupport
-
getJavaInitializationString
public java.lang.String getJavaInitializationString()
Returns a string for the property value.- Specified by:
getJavaInitializationStringin interfacejava.beans.PropertyEditor- Overrides:
getJavaInitializationStringin classjava.beans.PropertyEditorSupport- Returns:
- A string for the property value.
-
getCustomEditor
public java.awt.Component getCustomEditor()
Returns a component for editing aPaintinstance.- Specified by:
getCustomEditorin interfacejava.beans.PropertyEditor- Overrides:
getCustomEditorin classjava.beans.PropertyEditorSupport- Returns:
- A component for editing.
-
supportsCustomEditor
public boolean supportsCustomEditor()
Returnstrueto indicate that we provide a custom editor via thegetCustomEditor()method.- Specified by:
supportsCustomEditorin interfacejava.beans.PropertyEditor- Overrides:
supportsCustomEditorin classjava.beans.PropertyEditorSupport- Returns:
true.
-
-