harmonic.mz.entries
Class VectorEntry

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

public class VectorEntry
extends ValueEntry

GUI widget for seting a vector value. This internally uses two PointEntry to get the head and tail of the vector.

See Also:
Serialized Form

Constructor Summary
VectorEntry(java.lang.String label, java.lang.Object listener, java.lang.String callback, harmonic.meshGeom.math.Tuple3f vector)
          Constructs a VectorEntry
VectorEntry(java.lang.String label, harmonic.meshGeom.math.Tuple3f vector)
          Constructs a VectorEntry
 
Method Summary
 void assignFromReadout()
          Override to assign value from readout.
 void assignFromVectorText(java.lang.String vectorText)
           
 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 contract()
          Shrink to small size.
 void expand()
          Expand to full size.
 void finishEntry()
          Called when entry is properly finished.
 void format(int w, int h)
           
static void gcsToUcs(harmonic.meshGeom.math.Vec3f pnt)
           
 java.awt.Dimension getEntrySize()
          Override to return the size of the specialized value entry controls.
 harmonic.meshGeom.math.Pnt3f getHead()
          Returns head point.
 harmonic.meshGeom.math.Pnt3f getTail()
          Returns tail point.
 harmonic.meshGeom.math.Vec3f getVector()
          Returns vector value.
 void initReadout()
          Override to assign readout from value.
 void makeSettingsUI()
           
 void makeValueUI()
           
 void onHead(EntryEvent e)
           
 void onTail(EntryEvent e)
           
 void onVectorTextEntered(java.awt.event.TextEvent e)
           
 void setField(ModelNode f)
          Set effected data node
 void setHead(harmonic.meshGeom.math.Pnt3f pnt)
          Sets head point.
 void setTail(harmonic.meshGeom.math.Pnt3f pnt)
          Sets tail point.
 void setVector(harmonic.meshGeom.math.Vec3f v)
          Sets vector value.
static void ucsToGcs(harmonic.meshGeom.math.Vec3f pnt)
           
static void ucsToView(harmonic.meshGeom.math.Vec3f 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, contractIcon, echoFieldChange, expandCheck, expandIcon, finishTask, getField, getInstanceURL, getPreferredSize, getTaskName, getTypeURL, highlight, init, 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

VectorEntry

public VectorEntry(java.lang.String label,
                   harmonic.meshGeom.math.Tuple3f vector)
Constructs a VectorEntry


VectorEntry

public VectorEntry(java.lang.String label,
                   java.lang.Object listener,
                   java.lang.String callback,
                   harmonic.meshGeom.math.Tuple3f vector)
Constructs a VectorEntry

Method Detail

makeValueUI

public void makeValueUI()

makeSettingsUI

public void makeSettingsUI()

expand

public void expand()
Description copied from class: ValueEntry
Expand to full size. Default does nothing. There are no assumptions built into how the expand is accomplished, but a general pattern would be to add child components, calling reformat() when finished. These functions (expand() and contract()) provide users of ValueEntries to handle these ideas generally.

Overrides:
expand in class ValueEntry

contract

public void contract()
Description copied from class: ValueEntry
Shrink to small size.

Overrides:
contract in class ValueEntry

setField

public void setField(ModelNode f)
Set effected data node

Overrides:
setField in class ValueEntry

setVector

public void setVector(harmonic.meshGeom.math.Vec3f v)
Sets vector value.


getVector

public harmonic.meshGeom.math.Vec3f getVector()
Returns vector 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

getHead

public harmonic.meshGeom.math.Pnt3f getHead()
Returns head point.


getTail

public harmonic.meshGeom.math.Pnt3f getTail()
Returns tail point.


setHead

public void setHead(harmonic.meshGeom.math.Pnt3f pnt)
Sets head point.


setTail

public void setTail(harmonic.meshGeom.math.Pnt3f pnt)
Sets tail point.


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

ucsToGcs

public static void ucsToGcs(harmonic.meshGeom.math.Vec3f pnt)

gcsToUcs

public static void gcsToUcs(harmonic.meshGeom.math.Vec3f pnt)

ucsToView

public static void ucsToView(harmonic.meshGeom.math.Vec3f pnt)

onTail

public void onTail(EntryEvent e)

onHead

public void onHead(EntryEvent e)

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

onVectorTextEntered

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

assignFromVectorText

public void assignFromVectorText(java.lang.String vectorText)

initReadout

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

Overrides:
initReadout in class ValueEntry

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()