harmonic.mz.entries
Class ExclusiveIntEntry

java.lang.Object
  |
  +--HWPanel
        |
        +--harmonic.mz.gui.ValueEntry
              |
              +--harmonic.mz.entries.ExclusiveIntEntry
All Implemented Interfaces:
java.awt.event.ComponentListener, Documentable, java.util.EventListener, java.awt.event.ItemListener, NodeListener, harmonic.viewer3D.Task

public class ExclusiveIntEntry
extends ValueEntry
implements java.awt.event.ItemListener

For seting an ExlusiveIntField. This is a simple choice box.

See Also:
Serialized Form

Constructor Summary
ExclusiveIntEntry(java.lang.String _label, int value, java.lang.String[] optionNames, int[] options)
          Constructs an ExclusiveIntEntry
ExclusiveIntEntry(java.lang.String _label, java.lang.Object listener, java.lang.String callback, int value, java.lang.String[] optionNames, int[] options)
          Constructs an ExclusiveIntEntry
 
Method Summary
 void cleanTask()
           
 void format(int w, int h)
           
 java.awt.Dimension getEntrySize()
          Override to return the size of the specialized value entry controls.
 int getInt()
           
 void itemStateChanged(java.awt.event.ItemEvent event)
           
 void setField(ModelNode field)
           
 void updateField()
          This is called by notifyListeners we have a EntryEvent.VALUE_CHANGED.
 
Methods inherited from class harmonic.mz.gui.ValueEntry
_notifyListeners_, add, addEntryListener, aquireInput, assignFromReadout, beginEntry, beginTask, cancelEntry, cancelTask, componentHidden, componentMoved, componentResized, componentShown, contract, contractIcon, echoFieldChange, expand, expandCheck, expandIcon, finishEntry, finishTask, getField, getInstanceURL, getPreferredSize, getTaskName, getTypeURL, highlight, init, initReadout, innerChange, isActive, isDoingTask, isExpanded, monologFinished, mousePressed, nodeChanged, notifyListeners_ValueChanged, notifyListeners, onSettingsButton, removeEntryListener, savePrev, setDocURL, setInnerChange, setValue, transferListener, unlinkField, validateUISettings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExclusiveIntEntry

public ExclusiveIntEntry(java.lang.String _label,
                         int value,
                         java.lang.String[] optionNames,
                         int[] options)
Constructs an ExclusiveIntEntry

Parameters:
_label - Label to draw
value - Initial value
optionNames - Option names
options - Option values

ExclusiveIntEntry

public ExclusiveIntEntry(java.lang.String _label,
                         java.lang.Object listener,
                         java.lang.String callback,
                         int value,
                         java.lang.String[] optionNames,
                         int[] options)
Constructs an ExclusiveIntEntry

Parameters:
_label - Label to draw
listener - Object of listener
callback - Function of listener
value - Initial value
optionNames - Option names
options - Option values
Method Detail

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent event)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

updateField

public void updateField()
Description copied from class: ValueEntry
This is called by notifyListeners we have a EntryEvent.VALUE_CHANGED. It is a good place to insert code that updates a data nodes value from this. The policy is to update the field if it is known, rather than expecting a field to update it self by adding itself as a EntryListener. The caller of this changes the transientness of the field to match the EntryEvent.FINAL/INCREMENTAL flag.

Overrides:
updateField in class ValueEntry

setField

public void setField(ModelNode field)
Overrides:
setField in class ValueEntry

getInt

public int getInt()

format

public void format(int w,
                   int h)

getEntrySize

public java.awt.Dimension getEntrySize()
Description copied from class: ValueEntry
Override to return the size of the specialized value entry controls.

Overrides:
getEntrySize in class ValueEntry

cleanTask

public void cleanTask()
Specified by:
cleanTask in interface harmonic.viewer3D.Task