com.horstmann.violet.framework
Class PropertySelector

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by com.horstmann.violet.framework.PropertySelector
All Implemented Interfaces:
java.beans.PropertyEditor
Direct Known Subclasses:
ArrowHeadEditor, BentStyleEditor, LineStyleEditor

public class PropertySelector
extends java.beans.PropertyEditorSupport

A helper class for showing names of objects in a property sheet that allows the user to pick one of a finite set of named values.


Constructor Summary
PropertySelector(java.lang.String[] n, java.lang.Object[] v)
          Constructs a selector that correlates names and objects.
 
Method Summary
 java.lang.String getAsText()
           
 java.lang.String[] getTags()
           
 void setAsText(java.lang.String s)
           
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertySelector

public PropertySelector(java.lang.String[] n,
                        java.lang.Object[] v)
Constructs a selector that correlates names and objects.

Parameters:
n - the strings to display in a combo box
v - the corresponding object values
Method Detail

getTags

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

getAsText

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

setAsText

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