public class TranslationCommand extends AbstractTransaction
Modifier and Type | Field and Description |
---|---|
protected ArrayList<Element> |
elements |
protected int |
xd |
protected int |
yd |
commandManager, committed
version
Constructor and Description |
---|
TranslationCommand(CommandManager commandManager,
ArrayList<Element> elements)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
doCancel()
Undo the translation.
|
protected void |
doExecute() |
protected void |
doUndo() |
Element |
getModifiedElement() |
void |
move(int x,
int y)
Move elements by (x, y).
|
protected void |
moveElements(int x,
int y)
Move elements by (x, y)
|
cancel, commit, execute, undo
getVersion, setVersion
public TranslationCommand(CommandManager commandManager, ArrayList<Element> elements)
commandManager
- - The command managerelements
- - The array list of the elementsprotected void moveElements(int x, int y)
x
- - The x value of the property name 'x'y
- - The y value of the property name 'y'public void move(int x, int y)
move
in class AbstractTransaction
x
- - The x valuey
- - The y valueprotected void doCancel()
doCancel
in class AbstractTransaction
protected void doExecute()
doExecute
in class AbstractTransaction
protected void doUndo()
doUndo
in class AbstractTransaction
public Element getModifiedElement()
Copyright © 2014 Uppsala University and Aalborg University. All Rights Reserved.