harmonic.mz.entries
Class StringEntry

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

public class StringEntry
extends ValueEntry

GUI widget for setting text value.

See Also:
Serialized Form

Constructor Summary
StringEntry(java.lang.String label, java.lang.Object listener, java.lang.String callback, java.lang.String text)
          Constructs a StringEntry.
 
Method Summary
 void assignFromReadout()
          Override to assign value from readout.
 void beginEntry(harmonic.viewer3D.Task parentTask)
          Override to begin collecting input from user.
 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)
           
 java.awt.Dimension getEntrySize()
          Override to return the size of the specialized value entry controls.
 java.lang.String getString()
          Returns string value.
 void makeValueUI()
           
 void onTextEntered(java.awt.event.TextEvent e)
           
 void setField(ModelNode f)
          Sets effected data node.
 void setString(java.lang.String s)
          Sets string 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, cancelTask, componentHidden, componentMoved, componentResized, componentShown, contractIcon, echoFieldChange, expandCheck, expandIcon, finishTask, getField, getInstanceURL, getPreferredSize, 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

StringEntry

public StringEntry(java.lang.String label,
                   java.lang.Object listener,
                   java.lang.String callback,
                   java.lang.String text)
Constructs a StringEntry.

Method Detail

setField

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

Overrides:
setField in class ValueEntry

setString

public void setString(java.lang.String s)
Sets string value.


getString

public java.lang.String getString()
Returns string 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

makeValueUI

public void makeValueUI()

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

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

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

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

onTextEntered

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