roneditor.ronview.commands
Class CreateHLPlaceCommand

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

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

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

Author:
Tony Modica

Field Summary
private static java.lang.String CreateCommand_Label
           
private  java.lang.String name
           
private  ronmodel.HLPlace place
           
private  ronmodel.RON ron
           
private  ronmodel.HLPlaceType type
           
private  int x
           
private  int y
           
 
Constructor Summary
CreateHLPlaceCommand(ronmodel.RON ron, ronmodel.HLPlace place)
           
 
Method Summary
 void execute()
          Executes the command by adding the HLPlace to the RON.
 void redo()
           
 void setName(java.lang.String name)
           
 void setType(ronmodel.HLPlaceType type)
           
 void setX(int x)
           
 void setY(int y)
           
 void undo()
          Undoes the command by removing the HLPlace fromthe 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

place

private ronmodel.HLPlace place

name

private java.lang.String name

type

private ronmodel.HLPlaceType type

x

private int x

y

private int y
Constructor Detail

CreateHLPlaceCommand

public CreateHLPlaceCommand(ronmodel.RON ron,
                            ronmodel.HLPlace place)
Method Detail

execute

public void execute()
Executes the command by adding the HLPlace 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 HLPlace fromthe 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

setType

public void setType(ronmodel.HLPlaceType type)
Parameters:
type - the type to set

setX

public void setX(int x)

setY

public void setY(int y)