org.tigris.gef.base
Class CmdCreateNode
java.lang.Object
javax.swing.AbstractAction
org.tigris.gef.base.Cmd
org.tigris.gef.base.CmdCreateNode
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, GraphFactory, java.io.Serializable
- public class CmdCreateNode
- extends Cmd
- implements GraphFactory
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary |
CmdCreateNode(java.lang.Class nodeClass,
boolean sticky,
java.lang.String name)
|
CmdCreateNode(java.lang.Class nodeClass,
boolean sticky,
java.lang.String resource,
java.lang.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(java.lang.Class nodeClass,
java.lang.String name)
|
CmdCreateNode(java.lang.Class nodeClass,
java.lang.String resource,
java.lang.String name)
Construct a new Cmd with the given classes for the NetNode
and its FigNode. |
CmdCreateNode(java.util.Hashtable args,
java.lang.String name)
|
CmdCreateNode(java.util.Hashtable args,
java.lang.String resource,
java.lang.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 |
java.lang.Object |
getActiveGraphModel()
|
java.lang.Object |
makeEdge()
|
GraphModel |
makeGraphModel()
|
java.lang.Object |
makeNode()
Factory method for creating a new NetNode from the
className argument. |
void |
undoIt()
Undo the Cmd using information stored during its
execution. |
Methods inherited from class org.tigris.gef.base.Cmd |
about, actionPerformed, cmdAtIndex, containsArg, getArg, getArg, getName, getResource, register, registeredCmds, setArg, setName, setResource, shouldBeEnabled, updateEnabled |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_NODE_CLASS
public static java.lang.Class DEFAULT_NODE_CLASS
CmdCreateNode
public CmdCreateNode(java.util.Hashtable args,
java.lang.String resource,
java.lang.String name)
- Construct a new Cmd with the given arguments for node class.
CmdCreateNode
public CmdCreateNode(java.util.Hashtable args,
java.lang.String name)
CmdCreateNode
public CmdCreateNode(java.lang.Class nodeClass,
java.lang.String resource,
java.lang.String name)
- Construct a new Cmd with the given classes for the NetNode
and its FigNode.
CmdCreateNode
public CmdCreateNode(java.lang.Class nodeClass,
java.lang.String name)
CmdCreateNode
public CmdCreateNode(java.lang.Class nodeClass,
boolean sticky,
java.lang.String resource,
java.lang.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.
CmdCreateNode
public CmdCreateNode(java.lang.Class nodeClass,
boolean sticky,
java.lang.String name)
doIt
public void doIt()
- Actually instanciate the NetNode and FigNode objects and
set the global next mode to ModePlace
- Specified by:
doIt
in class Cmd
undoIt
public void undoIt()
- Description copied from class:
Cmd
- Undo the Cmd using information stored during its
execution.
needs-more-work: This is not currently implemented.
- Specified by:
undoIt
in class Cmd
makeGraphModel
public GraphModel makeGraphModel()
- Specified by:
makeGraphModel
in interface GraphFactory
makeEdge
public java.lang.Object makeEdge()
- Specified by:
makeEdge
in interface GraphFactory
makeNode
public java.lang.Object makeNode()
- Factory method for creating a new NetNode from the
className argument.
TODO This returns null on error. We need to define some
basic exception classes.
- Specified by:
makeNode
in interface GraphFactory
getActiveGraphModel
public java.lang.Object getActiveGraphModel()