harmonic.mz.entries
Class BooleanEntry

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

public class BooleanEntry
extends ValueEntry
implements NodeListener

GUI widget for entering a boolean value. This is presented as a simple check box.

See Also:
Serialized Form

Constructor Summary
BooleanEntry(java.lang.String _label, boolean value)
          Constructs an BooleanEntry
BooleanEntry(java.lang.String _label, java.lang.Object listener, java.lang.String callback, boolean value)
          Constructs an BooleanEntry
 
Method Summary
 void cleanTask()
           
 void format(int w, int h)
           
 boolean getBoolean()
          Returns boolean value.
 java.awt.Dimension getEntrySize()
          Override to return the size of the specialized value entry controls.
 void makeValueUI()
           
 void nodeChanged(NodeEvent event)
          Node has changed
 void onCheckbox(java.awt.event.ItemEvent event)
           
 void setBoolean(boolean b)
          Sets boolean value.
 void setField(ModelNode f)
          Sets data node to effect.
 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, 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

BooleanEntry

public BooleanEntry(java.lang.String _label,
                    boolean value)
Constructs an BooleanEntry


BooleanEntry

public BooleanEntry(java.lang.String _label,
                    java.lang.Object listener,
                    java.lang.String callback,
                    boolean value)
Constructs an BooleanEntry

Parameters:
listener - Listener to send AngleEvents to
callback - Listeners callback, declared as fnname(EntryEvent)
Method Detail

setField

public void setField(ModelNode f)
Sets data node to effect.

Overrides:
setField in class ValueEntry

setBoolean

public void setBoolean(boolean b)
Sets boolean value.


getBoolean

public boolean getBoolean()
Returns boolean value.


nodeChanged

public void nodeChanged(NodeEvent event)
Description copied from interface: NodeListener
Node has changed

Specified by:
nodeChanged in interface NodeListener
Overrides:
nodeChanged in class ValueEntry

makeValueUI

public void makeValueUI()

format

public void format(int w,
                   int h)

onCheckbox

public void onCheckbox(java.awt.event.ItemEvent event)

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

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