Class PainterPropertyEditor

  extended by java.beans.PropertyEditorSupport
      extended by org.jdesktop.swingx.editors.PainterPropertyEditor
All Implemented Interfaces:

public class PainterPropertyEditor
extends PropertyEditorSupport

Two parts to this property editor. The first part is a simple dropdown. The second part is a complicated UI for constructing multiple "layers" of various different Painters, including gradient painters.

Nested Class Summary
static class PainterPropertyEditor.AffineTransformDelegate
static class PainterPropertyEditor.Arc2DDelegate
static class PainterPropertyEditor.AreaDelegate
static class PainterPropertyEditor.CubicCurve2DDelegate
static class PainterPropertyEditor.Ellipse2DDelegate
static class PainterPropertyEditor.GeneralPathDelegate
static class PainterPropertyEditor.GradientPaintDelegate
static class PainterPropertyEditor.InsetsDelegate
static class PainterPropertyEditor.Line2DDelegate
static class PainterPropertyEditor.LinearGradientPaintDelegate
static class PainterPropertyEditor.Point2DDelegate
static class PainterPropertyEditor.QuadCurve2DDelegate
static class PainterPropertyEditor.RadialGradientPaintDelegate
static class PainterPropertyEditor.Rectangle2DDelegate
static class PainterPropertyEditor.RoundRectangle2DDelegate
static class PainterPropertyEditor.TestStuff
Constructor Summary
          Creates a new instance of PainterPropertyEditor
Method Summary
 String getJavaInitializationString()
          This method is intended for use when generating Java code to set the value of the property.
 Painter getValue()
          Gets the value of the property.
static void main(String... args)
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setAsText, setSource, setValue, supportsCustomEditor
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public PainterPropertyEditor()
Creates a new instance of PainterPropertyEditor

Method Detail


public Painter getValue()
Description copied from class: java.beans.PropertyEditorSupport
Gets the value of the property.

Specified by:
getValue in interface PropertyEditor
getValue in class PropertyEditorSupport
The value of the property.


public String getJavaInitializationString()
Description copied from class: java.beans.PropertyEditorSupport
This method is intended for use when generating Java code to set the value of the property. It should return a fragment of Java code that can be used to initialize a variable with the current property value.

Example results are "2", "new Color(127,127,34)", "", etc.

Specified by:
getJavaInitializationString in interface PropertyEditor
getJavaInitializationString in class PropertyEditorSupport
A fragment of Java code representing an initializer for the current value.


public static void main(String... args)