roneditor.ronview.commands
Class CreateTokenCommand
java.lang.Object
org.eclipse.gef.commands.Command
roneditor.ronview.commands.CreateTokenCommand
public class CreateTokenCommand
- extends org.eclipse.gef.commands.Command
Command for adding a Token to a HLPlace. This is undoable.
- Author:
- Tony Modica
Method Summary |
boolean |
canExecute()
|
void |
execute()
Executes the command by adding the Net to the HLPlace. |
void |
redo()
|
void |
setName(java.lang.String name)
|
void |
undo()
Undoes the command by removing the Token from the HLPlace. |
Methods inherited from class org.eclipse.gef.commands.Command |
canUndo, chain, dispose, getDebugLabel, getLabel, setDebugLabel, setLabel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CreateCommand_Label
private static final java.lang.String CreateCommand_Label
- See Also:
- Constant Field Values
place
private final ronmodel.HLPlace place
token
private ronmodel.Token token
name
private java.lang.String name
CreateTokenCommand
public CreateTokenCommand(ronmodel.HLPlace place,
ronmodel.Token token)
execute
public void execute()
- Executes the command by adding the Net to the HLPlace.
- Overrides:
execute
in class org.eclipse.gef.commands.Command
- See Also:
Command.execute()
undo
public void undo()
- Undoes the command by removing the Token from the HLPlace.
- Overrides:
undo
in class org.eclipse.gef.commands.Command
- See Also:
Command.undo()
redo
public void redo()
- Overrides:
redo
in class org.eclipse.gef.commands.Command
- See Also:
Command.redo()
canExecute
public boolean canExecute()
- Overrides:
canExecute
in class org.eclipse.gef.commands.Command
- See Also:
Command.canExecute()
setName
public void setName(java.lang.String name)
- Parameters:
name
- the name to set