harmonic.mz.entries
Class ScalarEntry

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

public class ScalarEntry
extends ValueEntry
implements NodeListener

GUI widget for setting scalar values. This will either have a text box or a scroll bar

See Also:
Serialized Form

Field Summary
static int RAIDUS_MOUSE_MODE
           
static int ZOOM_MOUSE_MODE
           
 
Constructor Summary
ScalarEntry(java.lang.String _label, java.lang.Object listener, java.lang.String callback, float val)
          Constructs a ScalarEntry
ScalarEntry(java.lang.String _label, java.lang.Object listener, java.lang.String callback, float val, float min, float max)
          Constructs a ScalarEntry
 
Method Summary
 void assignFromReadout()
          Override to assign value from readout.
 void assignFromScalerText(java.lang.String scalerText)
           
 void assignFromScrollBar()
           
 void beginEntry(harmonic.viewer3D.Task parentTask)
          Starts taking input.
 void cancelEntry()
          Called when entry or thing owning entry is canceled, as the elements of the task tree are canceled.
 void cleanTask()
           
 void finishEntry()
          Called when entry is properly finished.
 void format(int w, int h)
           
 java.awt.Dimension getEntrySize()
          Override to return the size of the specialized value entry controls.
 harmonic.meshGeom.math.Pnt3f getHead()
           
 float getScalar()
          Returns scalar value.
 harmonic.meshGeom.math.Pnt3f getTail()
           
 void initReadout()
          Override to assign readout from value.
 void makeValueUI()
           
 void nodeChanged(NodeEvent event)
          Node has changed
 void onScalerTextEntered(java.awt.event.TextEvent e)
           
 void onScrollBar(HWScrollEvent e)
           
 void onVectorEntry(EntryEvent e)
           
 float parseFloat(java.lang.String scalerText)
           
 void setField(ModelNode f)
          Sets data node effected by this.
 void setMouseMode(int mm)
           
 void setScalar(float f)
          Sets scalar value.
 void setTail(harmonic.meshGeom.math.Pnt3f tail)
          Sets tail in internal vector entry
 void setZoomBasePoint(harmonic.meshGeom.math.Pnt3f pnt)
           
 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, cancelTask, componentHidden, componentMoved, componentResized, componentShown, contract, contractIcon, echoFieldChange, expand, expandCheck, expandIcon, finishTask, getField, getInstanceURL, getPreferredSize, getTaskName, getTypeURL, highlight, init, 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
 

Field Detail

RAIDUS_MOUSE_MODE

public static final int RAIDUS_MOUSE_MODE
See Also:
Constant Field Values

ZOOM_MOUSE_MODE

public static final int ZOOM_MOUSE_MODE
See Also:
Constant Field Values
Constructor Detail

ScalarEntry

public ScalarEntry(java.lang.String _label,
                   java.lang.Object listener,
                   java.lang.String callback,
                   float val,
                   float min,
                   float max)
Constructs a ScalarEntry


ScalarEntry

public ScalarEntry(java.lang.String _label,
                   java.lang.Object listener,
                   java.lang.String callback,
                   float val)
Constructs a ScalarEntry

Method Detail

makeValueUI

public void makeValueUI()

setField

public void setField(ModelNode f)
Sets data node effected by this.

Overrides:
setField in class ValueEntry

setScalar

public void setScalar(float f)
Sets scalar value.


getScalar

public float getScalar()
Returns scalar 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

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

getHead

public harmonic.meshGeom.math.Pnt3f getHead()

getTail

public harmonic.meshGeom.math.Pnt3f getTail()

setMouseMode

public void setMouseMode(int mm)

setZoomBasePoint

public void setZoomBasePoint(harmonic.meshGeom.math.Pnt3f pnt)

beginEntry

public void beginEntry(harmonic.viewer3D.Task parentTask)
Starts taking input.

Overrides:
beginEntry in class ValueEntry

finishEntry

public void finishEntry()
Description copied from class: ValueEntry
Called when entry is properly finished. Do listener deregistration and remove any objects from viewport.

Overrides:
finishEntry in class ValueEntry

cancelEntry

public void cancelEntry()
Description copied from class: ValueEntry
Called when entry or thing owning entry is canceled, as the elements of the task tree are canceled. Do listener deregistration and remove any objects from viewport.

Overrides:
cancelEntry in class ValueEntry

cleanTask

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

setTail

public void setTail(harmonic.meshGeom.math.Pnt3f tail)
Sets tail in internal vector entry


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

onScalerTextEntered

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

parseFloat

public float parseFloat(java.lang.String scalerText)
                 throws java.lang.Exception
java.lang.Exception

assignFromScalerText

public void assignFromScalerText(java.lang.String scalerText)

assignFromScrollBar

public void assignFromScrollBar()

onVectorEntry

public void onVectorEntry(EntryEvent e)

onScrollBar

public void onScrollBar(HWScrollEvent e)

initReadout

public void initReadout()
Description copied from class: ValueEntry
Override to assign readout from value.

Overrides:
initReadout in class ValueEntry