UniVista.editors
Class VariableTypeEditor

java.lang.Object
  |
  +--java.beans.PropertyEditorSupport
        |
        +--UniVista.editors.VariableTypeEditor
All Implemented Interfaces:
java.beans.PropertyEditor

public class VariableTypeEditor
extends java.beans.PropertyEditorSupport

This is a custom propert editor for the Type property of Variables. The choices are defined by Variable.


Constructor Summary
VariableTypeEditor()
          Constructor.
VariableTypeEditor(boolean enable)
          Constructor with the mode supplied.
 
Method Summary
 java.awt.Component getCustomEditor()
          Returns the component to the builder.
 int getIndexValue()
           
 java.lang.String[] getTags()
          Override only this method to provide the tool a list of choices.
 java.lang.Object getValue()
          Make the selection available.
 boolean isPaintable()
          Also must be true.
 void setEnabled(boolean b)
          Make the UI editable.
 void setValue(java.lang.Object val)
           
 boolean supportsCustomEditor()
          Has to return true.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getJavaInitializationString, paintValue, removePropertyChangeListener, setAsText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableTypeEditor

public VariableTypeEditor()
Constructor.

VariableTypeEditor

public VariableTypeEditor(boolean enable)
Constructor with the mode supplied.
Method Detail

getValue

public java.lang.Object getValue()
Make the selection available. It is returned as the index to the array of Variable type strings.
Overrides:
getValue in class java.beans.PropertyEditorSupport

getIndexValue

public int getIndexValue()

setValue

public void setValue(java.lang.Object val)
Overrides:
setValue in class java.beans.PropertyEditorSupport

getCustomEditor

public java.awt.Component getCustomEditor()
Returns the component to the builder.
Overrides:
getCustomEditor in class java.beans.PropertyEditorSupport

supportsCustomEditor

public boolean supportsCustomEditor()
Has to return true.
Overrides:
supportsCustomEditor in class java.beans.PropertyEditorSupport

isPaintable

public boolean isPaintable()
Also must be true.
Overrides:
isPaintable in class java.beans.PropertyEditorSupport

getTags

public java.lang.String[] getTags()
Override only this method to provide the tool a list of choices.
Overrides:
getTags in class java.beans.PropertyEditorSupport

setEnabled

public void setEnabled(boolean b)
Make the UI editable.