Class MoveTopicCommand
java.lang.Object
rs.edu.raf.dsw.rudok.app.gui.swing.command.AbstractCommand
rs.edu.raf.dsw.rudok.app.gui.swing.command.standard.MoveTopicCommand
public class MoveTopicCommand extends AbstractCommand
This command moves the passed
Topic
s along the X/Y axis by the given amount. NOTE: this command
considers the movement to have been ALREADY completed. doCommand()
method does nothing. This
command is simply a wrapper to record the history of Topic
s movement and enable redoing/undoing.-
Constructor Summary
Constructors Constructor Description MoveTopicCommand(int dX, int dY, Topic... targets)
Default constructor. -
Method Summary
Modifier and Type Method Description void
doCommand()
Executes the encapsulated command.void
redoCommand()
Executes the encapsulated command from previously calculated results.void
undoCommand()
Reverses the encapsulated command.Methods inherited from class rs.edu.raf.dsw.rudok.app.gui.swing.command.AbstractCommand
isCommitted, setCommitted
-
Constructor Details
-
MoveTopicCommand
Default constructor.- Parameters:
dX
- Change in position along the X-axis.dY
- Change in position along the Y-axis.targets
- Moved topics.
-
-
Method Details
-
doCommand
public void doCommand()Description copied from class:AbstractCommand
Executes the encapsulated command.- Specified by:
doCommand
in classAbstractCommand
-
redoCommand
public void redoCommand()Description copied from class:AbstractCommand
Executes the encapsulated command from previously calculated results.- Specified by:
redoCommand
in classAbstractCommand
-
undoCommand
public void undoCommand()Description copied from class:AbstractCommand
Reverses the encapsulated command.- Specified by:
undoCommand
in classAbstractCommand
-