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
|
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. |
| Methods inherited from class uci.gef.Cmd |
about,
actionPerformed,
cmdAtIndex,
containsArg,
getArg,
getArg,
getName,
register,
registeredCmds,
setArg,
setName,
shouldBeEnabled,
updateEnabled |
DEFAULT_NODE_CLASS
public static Class DEFAULT_NODE_CLASS
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.
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