harmonic.mz.entries
Class IntEntry

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

public class IntEntry
extends ValueEntry
implements NodeListener

See Also:
Serialized Form

Constructor Summary
IntEntry(java.lang.String _label, java.lang.Object listener, java.lang.String callback, int val)
          Constructs an IntEntry with a text box
IntEntry(java.lang.String _label, java.lang.Object listener, java.lang.String callback, int val, float min, float max)
          Constructs an IntEntry with a scroll bar
 
Method Summary
 void assignFromIntText(java.lang.String s)
           
 void assignFromReadout()
          Override to assign value from readout.
 void beginEntry(harmonic.viewer3D.Task task)
          Override to begin collecting input from user.
 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()
          Returns integer value.
 void makeValueUI()
           
 void nodeChanged(NodeEvent event)
          Node has changed
 void onIntTextEntered(java.awt.event.TextEvent e)
           
 void onScrollBar(HWScrollEvent e)
           
 int parseInt(java.lang.String text)
           
 void setField(ModelNode f)
          Sets field to effect.
 void setInt(int n)
          Sets integer value.
 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, 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

IntEntry

public IntEntry(java.lang.String _label,
                java.lang.Object listener,
                java.lang.String callback,
                int val)
Constructs an IntEntry with a text box

Parameters:
listener - Listener to send ScalarEvents to
callback - Listeners callback, declared as fnname(EntryEvent)
val - Initial integer value

IntEntry

public IntEntry(java.lang.String _label,
                java.lang.Object listener,
                java.lang.String callback,
                int val,
                float min,
                float max)
Constructs an IntEntry with a scroll bar

Parameters:
listener - Listener to send ScalarEvents to
callback - Listeners callback, declared as fnname(EntryEvent)
val - Initial integer value
min - Minimum integer value for scroll bar
max - Maximum integer value
Method Detail

setField

public void setField(ModelNode f)
Sets field to effect.

Overrides:
setField in class ValueEntry

setInt

public void setInt(int n)
Sets integer value.


getInt

public int getInt()
Returns integer value.


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

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)

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

beginEntry

public void beginEntry(harmonic.viewer3D.Task task)
Description copied from class: ValueEntry
Override to begin collecting input from user. This may simply set the keyboard focus to a inner window, or if could register a mouse listener with the viewports, or it may create a Selector and start selecting objects. Be sure to call super.aquireInput().

Overrides:
beginEntry in class ValueEntry

parseInt

public int parseInt(java.lang.String text)
             throws java.lang.Exception
java.lang.Exception

assignFromReadout

public void assignFromReadout()
Description copied from class: ValueEntry
Override to assign value from readout. Called by InputEntrySequence when next value is requested.

Overrides:
assignFromReadout in class ValueEntry

onIntTextEntered

public void onIntTextEntered(java.awt.event.TextEvent e)

assignFromIntText

public void assignFromIntText(java.lang.String s)

onScrollBar

public void onScrollBar(HWScrollEvent e)

cleanTask

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