com.isti.util.propertyeditor
Class ValueArrayPropertyEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by com.isti.util.propertyeditor.AbstractPropertyEditor
          extended by com.isti.util.propertyeditor.ValueArrayPropertyEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class ValueArrayPropertyEditor
extends AbstractPropertyEditor

A PropertyEditor for a value array.


Field Summary
protected  javax.swing.JComboBox comboBox
          The GUI component of this editor.
 
Constructor Summary
ValueArrayPropertyEditor()
          Creates A PropertyEditor for a value array.
ValueArrayPropertyEditor(java.lang.Object[] validValuesArr)
          Creates A PropertyEditor for a value array.
 
Method Summary
 void addActionListener(java.awt.event.ActionListener l)
          Adds an ActionListener to the button.
 java.lang.String getAsText()
          Returns value as a String.
 java.awt.Component getCustomEditor()
          Returns the editor GUI.
 java.lang.Object getValue()
          Returns value.
 void removeActionListener(java.awt.event.ActionListener l)
          Removes an ActionListener from the button.
 void setAsText(java.lang.String text)
          Sets value as text.
protected  void setSelectedItem(java.lang.String anObject)
          Sets the selected item in the JComboBox by specifying the object in the list.
 void setValue(java.lang.Object someObj)
          Sets value.
 boolean supportsCustomEditor()
          Determines whether the propertyeditor can provide a custom editor.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getSource, getTags, isPaintable, paintValue, removePropertyChangeListener, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

comboBox

protected final javax.swing.JComboBox comboBox
The GUI component of this editor.

Constructor Detail

ValueArrayPropertyEditor

public ValueArrayPropertyEditor()
Creates A PropertyEditor for a value array.


ValueArrayPropertyEditor

public ValueArrayPropertyEditor(java.lang.Object[] validValuesArr)
Creates A PropertyEditor for a value array.

Parameters:
validValuesArr - valid values array.
Method Detail

supportsCustomEditor

public boolean supportsCustomEditor()
Determines whether the propertyeditor can provide a custom editor.

Specified by:
supportsCustomEditor in interface java.beans.PropertyEditor
Overrides:
supportsCustomEditor in class java.beans.PropertyEditorSupport
Returns:
true

getCustomEditor

public java.awt.Component getCustomEditor()
Returns the editor GUI.

Specified by:
getCustomEditor in interface java.beans.PropertyEditor
Overrides:
getCustomEditor in class java.beans.PropertyEditorSupport
Returns:
component for editor.

setValue

public void setValue(java.lang.Object someObj)
Sets value.

Specified by:
setValue in interface java.beans.PropertyEditor
Overrides:
setValue in class java.beans.PropertyEditorSupport
Parameters:
someObj - value

setAsText

public void setAsText(java.lang.String text)
Sets value as text.

Specified by:
setAsText in interface java.beans.PropertyEditor
Overrides:
setAsText in class java.beans.PropertyEditorSupport
Parameters:
text - value

getValue

public java.lang.Object getValue()
Returns value.

Specified by:
getValue in interface java.beans.PropertyEditor
Overrides:
getValue in class java.beans.PropertyEditorSupport
Returns:
the value

getAsText

public java.lang.String getAsText()
Returns value as a String.

Specified by:
getAsText in interface java.beans.PropertyEditor
Overrides:
getAsText in class java.beans.PropertyEditorSupport
Returns:
the value as a string

addActionListener

public void addActionListener(java.awt.event.ActionListener l)
Adds an ActionListener to the button.

Specified by:
addActionListener in class AbstractPropertyEditor
Parameters:
l - the ActionListener to be added

removeActionListener

public void removeActionListener(java.awt.event.ActionListener l)
Removes an ActionListener from the button. If the listener is the currently set Action for the button, then the Action is set to null.

Specified by:
removeActionListener in class AbstractPropertyEditor
Parameters:
l - the listener to be removed

setSelectedItem

protected void setSelectedItem(java.lang.String anObject)
Sets the selected item in the JComboBox by specifying the object in the list. If anObject is in the list, the list displays with anObject selected.

Parameters:
anObject - the list object to select