roneditor.ronview.commands
Class CreateHLTransitionCommand

java.lang.Object
  extended by org.eclipse.gef.commands.Command
      extended by roneditor.ronview.commands.CreateHLTransitionCommand

public class CreateHLTransitionCommand
extends org.eclipse.gef.commands.Command

Command for adding a HLTransition to a RON. This is undoable.

Author:
Tony Modica

Field Summary
private static java.lang.String CreateCommand_Label
           
private  ronmodel.HLTransitionKind kind
           
private  java.lang.String name
           
private  ronmodel.RON ron
           
private  ronmodel.HLTransition transition
           
private  int x
           
private  int y
           
 
Constructor Summary
CreateHLTransitionCommand(ronmodel.RON ron, ronmodel.HLTransition transition)
           
 
Method Summary
 void execute()
          Executes the command by adding the HLTransition to the RON.
 void redo()
           
 void setKind(ronmodel.HLTransitionKind kind)
           
 void setName(java.lang.String name)
           
 void setX(int x)
           
 void setY(int y)
           
 void undo()
          Undoes the command by removing the HLTransition from the RON.
 
Methods inherited from class org.eclipse.gef.commands.Command
canExecute, 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
 

Field Detail

CreateCommand_Label

private static final java.lang.String CreateCommand_Label
See Also:
Constant Field Values

ron

private final ronmodel.RON ron

transition

private ronmodel.HLTransition transition

name

private java.lang.String name

kind

private ronmodel.HLTransitionKind kind

x

private int x

y

private int y
Constructor Detail

CreateHLTransitionCommand

public CreateHLTransitionCommand(ronmodel.RON ron,
                                 ronmodel.HLTransition transition)
Method Detail

execute

public void execute()
Executes the command by adding the HLTransition to the RON.

Overrides:
execute in class org.eclipse.gef.commands.Command
See Also:
Command.execute()

undo

public void undo()
Undoes the command by removing the HLTransition from the RON.

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()

setName

public void setName(java.lang.String name)
Parameters:
name - the name to set

setKind

public void setKind(ronmodel.HLTransitionKind kind)

setX

public void setX(int x)

setY

public void setY(int y)