harmonic.mz.entries
Class AxisEntry

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

public class AxisEntry
extends ValueEntry

GUI widget for entring an axis, which is a vector with a position. One way this information can be entered is to pick two points of the viewport, using PointEntry and a VectorEntry contained within this. This entry also has options for using the current UCS x axis, y axis or z axis.

See Also:
Serialized Form

Constructor Summary
AxisEntry(java.lang.String _label, java.lang.Object listener, java.lang.String callback, harmonic.meshGeom.math.Pnt3f pos, harmonic.meshGeom.math.Vec3f dir)
          Constructs an AxisEntry.
AxisEntry(java.lang.String _label, harmonic.meshGeom.math.Pnt3f pos, harmonic.meshGeom.math.Vec3f dir)
          Constructs an AxisEntry.
 
Method Summary
 void aquirePerMethod()
           
 void beginEntry(harmonic.viewer3D.Task parentTask)
          Start input.
 void cleanTask()
           
 void finishEntry()
          Called when entry is properly finished.
 void format(int w, int h)
           
 harmonic.meshGeom.math.Vec3f getAxisDirection()
          Return current axis direction.
 harmonic.meshGeom.math.Pnt3f getAxisPosition()
          Return current axis position.
 java.awt.Dimension getPreferredSize()
          This either calles refPanel.getPreferredSize() or getEntrySize() depending on what is showing.
 void onMethodChoice(java.awt.event.ItemEvent e)
           
 void onPointEntry(EntryEvent e)
           
 void onVectorEntry(EntryEvent e)
           
 void setField(ModelNode f)
          Set field to apply axis to.
 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, beginTask, cancelEntry, cancelTask, componentHidden, componentMoved, componentResized, componentShown, contract, contractIcon, echoFieldChange, expand, expandCheck, expandIcon, finishTask, getEntrySize, getField, getInstanceURL, 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

AxisEntry

public AxisEntry(java.lang.String _label,
                 harmonic.meshGeom.math.Pnt3f pos,
                 harmonic.meshGeom.math.Vec3f dir)
Constructs an AxisEntry.

Parameters:
pos - Initial axis position
dir - Initial axis direction

AxisEntry

public AxisEntry(java.lang.String _label,
                 java.lang.Object listener,
                 java.lang.String callback,
                 harmonic.meshGeom.math.Pnt3f pos,
                 harmonic.meshGeom.math.Vec3f dir)
Constructs an AxisEntry.

Parameters:
listener - Listener to send AxixEvents to
callback - Listeners callback, declared as fnname(AxisEvent)
pos - Initial axis position
dir - Initial axis direction
Method Detail

getAxisPosition

public harmonic.meshGeom.math.Pnt3f getAxisPosition()
Return current axis position.


getAxisDirection

public harmonic.meshGeom.math.Vec3f getAxisDirection()
Return current axis direction.


format

public void format(int w,
                   int h)

setField

public void setField(ModelNode f)
Set field to apply axis to.

Overrides:
setField in class ValueEntry

beginEntry

public void beginEntry(harmonic.viewer3D.Task parentTask)
Start 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

cleanTask

public void cleanTask()

onMethodChoice

public void onMethodChoice(java.awt.event.ItemEvent e)

aquirePerMethod

public void aquirePerMethod()

onPointEntry

public void onPointEntry(EntryEvent e)

onVectorEntry

public void onVectorEntry(EntryEvent e)

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

getPreferredSize

public java.awt.Dimension getPreferredSize()
Description copied from class: ValueEntry
This either calles refPanel.getPreferredSize() or getEntrySize() depending on what is showing.

Overrides:
getPreferredSize in class ValueEntry