antsnest.antbeans
Class StringListPropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by antsnest.antbeans.StringListPropertyEditor
All Implemented Interfaces:
ActionListener, PropertyEditor, EventListener

public class StringListPropertyEditor
extends PropertyEditorSupport
implements ActionListener

A way to customize a list of strings

Author:
Chris Clohosy

Constructor Summary
StringListPropertyEditor()
          A null constructor
 
Method Summary
 void actionPerformed(ActionEvent e)
          Called if an action is performed
 Component getCustomEditor()
          Gets the editor used to edit the list
 Object getValue()
          Gets the object being edited by this editor
 boolean isPaintable()
           
 void paintValue(Graphics g, Rectangle box)
           
 void setValue(Object obj)
          Sets the object being edited by this editor
 boolean supportsCustomEditor()
          Whether this editor provides a custom editor
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getJavaInitializationString, getSource, getTags, removePropertyChangeListener, setAsText, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringListPropertyEditor

public StringListPropertyEditor()
A null constructor

Method Detail

setValue

public void setValue(Object obj)
Sets the object being edited by this editor

Specified by:
setValue in interface PropertyEditor
Overrides:
setValue in class PropertyEditorSupport
Parameters:
obj - the object being edited

getValue

public Object getValue()
Gets the object being edited by this editor

Specified by:
getValue in interface PropertyEditor
Overrides:
getValue in class PropertyEditorSupport
Returns:
an Object, the object being edited

getCustomEditor

public Component getCustomEditor()
Gets the editor used to edit the list

Specified by:
getCustomEditor in interface PropertyEditor
Overrides:
getCustomEditor in class PropertyEditorSupport
Returns:
a Component, the editor

supportsCustomEditor

public boolean supportsCustomEditor()
Whether this editor provides a custom editor

Specified by:
supportsCustomEditor in interface PropertyEditor
Overrides:
supportsCustomEditor in class PropertyEditorSupport
Returns:
a boolean, whether it supports a custom editor

isPaintable

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

paintValue

public void paintValue(Graphics g,
                       Rectangle box)
Specified by:
paintValue in interface PropertyEditor
Overrides:
paintValue in class PropertyEditorSupport

actionPerformed

public void actionPerformed(ActionEvent e)
Called if an action is performed

Specified by:
actionPerformed in interface ActionListener
Parameters:
e - the event that caused the call