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
Topics 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 Topics 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 voiddoCommand()Executes the encapsulated command.voidredoCommand()Executes the encapsulated command from previously calculated results.voidundoCommand()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:AbstractCommandExecutes the encapsulated command.- Specified by:
doCommandin classAbstractCommand
-
redoCommand
public void redoCommand()Description copied from class:AbstractCommandExecutes the encapsulated command from previously calculated results.- Specified by:
redoCommandin classAbstractCommand
-
undoCommand
public void undoCommand()Description copied from class:AbstractCommandReverses the encapsulated command.- Specified by:
undoCommandin classAbstractCommand
-