public class TranslationCommand extends AbstractTransaction
| Modifier and Type | Field and Description |
|---|---|
protected ArrayList<Element> |
elements |
protected int |
xd |
protected int |
yd |
commandManager, committedversion| 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, undogetVersion, setVersionpublic 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 AbstractTransactionx - - The x valuey - - The y valueprotected void doCancel()
doCancel in class AbstractTransactionprotected void doExecute()
doExecute in class AbstractTransactionprotected void doUndo()
doUndo in class AbstractTransactionpublic Element getModifiedElement()
Copyright © 2014 Uppsala University and Aalborg University. All Rights Reserved.