plugins.adufour.vars.gui.swing
Class TypeChooser

java.lang.Object
  extended by plugins.adufour.vars.gui.VarEditor<V>
      extended by plugins.adufour.vars.gui.swing.SwingVarEditor<T>
          extended by plugins.adufour.vars.gui.swing.ComboBox
              extended by plugins.adufour.vars.gui.swing.TypeChooser
All Implemented Interfaces:
TypeChangeListener, VarListener

public class TypeChooser
extends ComboBox
implements TypeChangeListener


Field Summary
 
Fields inherited from class plugins.adufour.vars.gui.VarEditor
variable
 
Constructor Summary
TypeChooser(VarMutable variable)
           
 
Method Summary
protected  void activateListeners()
          Activates listeners on the editor component.
protected  javax.swing.ListCellRenderer createRenderer()
           
protected  void deactivateListeners()
          Deactivates listeners on the editor component.
 void typeChanged(java.lang.Object source, java.lang.Class<?> oldType, java.lang.Class<?> newType)
           
protected  void updateInterfaceValue()
          Updates the graphical interface component to reflect the new value of the underlying variable (accessible via the Var.getValue() method).
protected  void updateVariableValue()
           
 
Methods inherited from class plugins.adufour.vars.gui.swing.ComboBox
createEditor, createEditorComponent, dispose, getEditorComponent, setDefaultValues
 
Methods inherited from class plugins.adufour.vars.gui.swing.SwingVarEditor
getPreferredSize, isComponentEnabled, isComponentOpaque, setComponentToolTipText, setEditorEnabled
 
Methods inherited from class plugins.adufour.vars.gui.VarEditor
getComponentHorizontalResizeFactor, getComponentVerticalResizeFactor, getVariable, isComponentFocusable, isComponentResizeable, isNameVisible, referenceChanged, setComponentFocusable, setComponentResizeable, setEnabled, setNameVisible, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeChooser

public TypeChooser(VarMutable variable)
Method Detail

activateListeners

protected void activateListeners()
Description copied from class: VarEditor
Activates listeners on the editor component. Listeners should be activated here rather than in the VarEditor.createEditorComponent() method, in order to allow the target containers to optimize the scheduling and load of events to fire, and to ensure proper garbage collection when the interface is destroyed.

Overrides:
activateListeners in class ComboBox

deactivateListeners

protected void deactivateListeners()
Description copied from class: VarEditor
Deactivates listeners on the editor component. Listeners should be deactivated here rather than in the VarEditor.createEditorComponent() method, in order to allow the target containers to optimize the scheduling and load of events to fire, and to ensure proper garbage collection when the interface is destroyed.

Overrides:
deactivateListeners in class ComboBox

createRenderer

protected javax.swing.ListCellRenderer createRenderer()
Overrides:
createRenderer in class ComboBox

updateVariableValue

protected void updateVariableValue()
Overrides:
updateVariableValue in class ComboBox

updateInterfaceValue

protected void updateInterfaceValue()
Description copied from class: VarEditor
Updates the graphical interface component to reflect the new value of the underlying variable (accessible via the Var.getValue() method).

Overrides:
updateInterfaceValue in class ComboBox

typeChanged

public void typeChanged(java.lang.Object source,
                        java.lang.Class<?> oldType,
                        java.lang.Class<?> newType)
Specified by:
typeChanged in interface TypeChangeListener