uci.gef
Class CmdCreateNode

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--uci.gef.Cmd
              |
              +--uci.gef.CmdCreateNode
Direct Known Subclasses:
ActionCreatePseudostate

public class CmdCreateNode
extends Cmd
implements GraphFactory

Editor Cmd to create a new FigNode on a new NetNode. When this Cmd is executed it makes the new objects as per its arguments, and then it sets the global next mode to ModePlace so that the user can place the new node in any editor window.

See Also:
ModePlace, NetNode, FigNode, Serialized Form

Field Summary
static Class DEFAULT_NODE_CLASS
           
 
Fields inherited from class uci.gef.Cmd
_args, HAS_ICON, NO_ICON
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Constructor Summary
CmdCreateNode(Class nodeClass, boolean sticky, String name)
          Construct a new Cmd with the given classes for the NetNode and its FigNode, and set the global sticky mode boolean to the given value.
CmdCreateNode(Class nodeClass, String name)
          Construct a new Cmd with the given classes for the NetNode and its FigNode.
CmdCreateNode(Hashtable args, String name)
          Construct a new Cmd with the given arguments for node class.
 
Method Summary
 void doIt()
          Actually instanciate the NetNode and FigNode objects and set the global next mode to ModePlace
 Object makeEdge()
           
 GraphModel makeGraphModel()
           
 Object makeNode()
           
 void undoIt()
           
 
Methods inherited from class uci.gef.Cmd
about, actionPerformed, cmdAtIndex, containsArg, getArg, getArg, getName, register, registeredCmds, setArg, setName, shouldBeEnabled, updateEnabled
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_NODE_CLASS

public static Class DEFAULT_NODE_CLASS
Constructor Detail

CmdCreateNode

public CmdCreateNode(Hashtable args,
                     String name)
Construct a new Cmd with the given arguments for node class.

CmdCreateNode

public CmdCreateNode(Class nodeClass,
                     String name)
Construct a new Cmd with the given classes for the NetNode and its FigNode.

CmdCreateNode

public CmdCreateNode(Class nodeClass,
                     boolean sticky,
                     String name)
Construct a new Cmd with the given classes for the NetNode and its FigNode, and set the global sticky mode boolean to the given value. This allows the user to place several nodes rapidly.
Method Detail

doIt

public void doIt()
Actually instanciate the NetNode and FigNode objects and set the global next mode to ModePlace
Overrides:
doIt in class Cmd

undoIt

public void undoIt()
Overrides:
undoIt in class Cmd

makeGraphModel

public GraphModel makeGraphModel()
Specified by:
makeGraphModel in interface GraphFactory

makeEdge

public Object makeEdge()
Specified by:
makeEdge in interface GraphFactory

makeNode

public Object makeNode()
Specified by:
makeNode in interface GraphFactory