harmonic.mz.gui
Class SequenceFunctionDialog

java.lang.Object
  |
  +--HWPanel
        |
        +--harmonic.mz.gui.Monolog
              |
              +--harmonic.mz.gui.SequenceFunctionDialog
All Implemented Interfaces:
java.util.EventListener, java.awt.event.KeyListener, NodeListener, harmonic.viewer3D.Task, java.awt.event.WindowListener

public class SequenceFunctionDialog
extends Monolog

This class may be used for gathering user input sequentailly and them using the input to do something usefull, for occasions when this simple model is sufficient. The CAD program extension makes use of this for most of its interface.. Add fields to the function call post(), and the user will be prompted for input for each on in turn. When everything is set finish() is called. Override this do what the function is suppoed to do.

See Also:
Serialized Form

Nested Class Summary
 class SequenceFunctionDialog.StackedInsert
           
 class SequenceFunctionDialog.TabbedInsert
           
 
Nested classes inherited from class harmonic.mz.gui.Monolog
Monolog.MonoFrame
 
Field Summary
 boolean bAutoFinish
           
 java.lang.String cat
           
 java.awt.Component dataInsert
           
 java.util.Vector fields
           
 InputEntrySequence is
           
 java.awt.Component okInsert
           
 
Fields inherited from class harmonic.mz.gui.Monolog
bPermanent, CLOSED, creatingModule, DOCK_MONOLOG, FLOAT_MONOLOG, postMethod, stdDialogWidth, visibility
 
Constructor Summary
SequenceFunctionDialog()
          Constructs a SequenceFunctionDialog.
 
Method Summary
 FunctionStarter action()
          Adpater action that started this function
 void addEntry(ValueEntry entry)
          Add entry to input list.
 void addField(ModelNode node)
          Add field to present to user for specification.
 void addField(java.lang.String name, ModelNode node)
          Add field to present to user for specification.
 void addFieldControls()
           
 void afterPost()
          Called after dialog is posted.
 void aquireInput(ModelNode node)
          Present the given node for input
 void cancelTask()
          This is the first level cancel function.
 boolean canFinish()
           
 void cleanTask()
           
 void clearFields()
          Remove all fields
 void finishTask()
          This is the first level finish function.
 void format(int w, int h)
           
 java.awt.Dimension getPreferredSize()
           
 void init()
          Override to initialize.
 void noPost()
           
 void onOK()
           
 void removeField(ModelNode node)
          Remove field from list
 void sequenceFinished()
           
 void setAutoFinish(boolean b)
          Sets whether this dialog will end automatically when last field is input
 boolean shouldPost()
           
 
Methods inherited from class harmonic.mz.gui.Monolog
addListener, addSubMonolog, begin, beginTask, cancel, destroyIfTemporary, drop, finish, frameSize, getFrame, getTaskName, init_Bottom, init_Floating, init_Info, init_Left, init_Right, init_Top, keyPressed, keyReleased, keyTyped, nodeChanged, onCancel, onDismiss, onHelp, post, post, post, post, postModal, postModal, processKeyEvent, reformat, removeStandardButtons, setFunction, setMonologClass, setPermenant, setPosted, setResizeable, setTitle, unpost, unpost, updateMonologInfo, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

is

public InputEntrySequence is

fields

public java.util.Vector fields

bAutoFinish

public boolean bAutoFinish

cat

public java.lang.String cat

dataInsert

public java.awt.Component dataInsert

okInsert

public java.awt.Component okInsert
Constructor Detail

SequenceFunctionDialog

public SequenceFunctionDialog()
Constructs a SequenceFunctionDialog.

Method Detail

format

public void format(int w,
                   int h)

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class Monolog

clearFields

public void clearFields()
Remove all fields


addEntry

public void addEntry(ValueEntry entry)
Add entry to input list.


addField

public void addField(java.lang.String name,
                     ModelNode node)
Add field to present to user for specification.

Parameters:
name - Name of field
node - Field to set

addField

public void addField(ModelNode node)
Add field to present to user for specification.

Parameters:
node - Field to set

removeField

public void removeField(ModelNode node)
Remove field from list

Parameters:
node - Field to remove

aquireInput

public void aquireInput(ModelNode node)
Present the given node for input


setAutoFinish

public void setAutoFinish(boolean b)
Sets whether this dialog will end automatically when last field is input


canFinish

public boolean canFinish()

action

public FunctionStarter action()
Adpater action that started this function


shouldPost

public boolean shouldPost()
Overrides:
shouldPost in class Monolog

init

public void init()
Description copied from class: Monolog
Override to initialize. This is called BEFORE post(), and before shouldPost() is consulted.

Overrides:
init in class Monolog

afterPost

public void afterPost()
Description copied from class: Monolog
Called after dialog is posted. Override to start any tasks, or anything else that should happen.

Overrides:
afterPost in class Monolog

noPost

public void noPost()
Overrides:
noPost in class Monolog

addFieldControls

public void addFieldControls()

onOK

public void onOK()
Overrides:
onOK in class Monolog

sequenceFinished

public void sequenceFinished()

finishTask

public void finishTask()
This is the first level finish function. This will remove the gui for thid function and call finish(). Its not a good idea of override this.

Specified by:
finishTask in interface harmonic.viewer3D.Task
Overrides:
finishTask in class Monolog

cancelTask

public void cancelTask()
This is the first level cancel function. This will remove the gui for thid function and call cancel(). Its not a good idea of override this.

Specified by:
cancelTask in interface harmonic.viewer3D.Task
Overrides:
cancelTask in class Monolog

cleanTask

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