org.jdesktop.swingx.editors
Class PaintPropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.jdesktop.swingx.editors.PaintPropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class PaintPropertyEditor
extends java.beans.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 paints.


Constructor Summary
PaintPropertyEditor()
          Creates a new instance of PainterPropertyEditor
 
Method Summary
 java.lang.String getAsText()
           
 java.lang.String getJavaInitializationString()
           
 java.lang.String[] getTags()
           
 java.awt.Paint getValue()
           
 boolean isPaintable()
           
 void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)
           
 void setAsText(java.lang.String text)
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getSource, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaintPropertyEditor

public PaintPropertyEditor()
Creates a new instance of PainterPropertyEditor

Method Detail

getTags

public java.lang.String[] getTags()
Specified by:
getTags in interface java.beans.PropertyEditor
Overrides:
getTags in class java.beans.PropertyEditorSupport

getValue

public java.awt.Paint getValue()
Specified by:
getValue in interface java.beans.PropertyEditor
Overrides:
getValue in class java.beans.PropertyEditorSupport

getJavaInitializationString

public java.lang.String getJavaInitializationString()
Specified by:
getJavaInitializationString in interface java.beans.PropertyEditor
Overrides:
getJavaInitializationString in class java.beans.PropertyEditorSupport

setAsText

public void setAsText(java.lang.String text)
               throws java.lang.IllegalArgumentException
Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Throws:
java.lang.IllegalArgumentException

getAsText

public java.lang.String getAsText()
Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport

paintValue

public void paintValue(java.awt.Graphics gfx,
                       java.awt.Rectangle box)
Specified by:
paintValue in interface java.beans.PropertyEditor
Overrides:
paintValue in class java.beans.PropertyEditorSupport

isPaintable

public boolean isPaintable()
Specified by:
isPaintable in interface java.beans.PropertyEditor
Overrides:
isPaintable in class java.beans.PropertyEditorSupport