Graphic Rendering System 1.0
A Java-based graphic rendering system implementing various design patterns
|
Public Member Functions | |
MoveShapeCommand (Shape shape, int newX, int newY) | |
void | execute () |
void | undo () |
Private Attributes | |
final int | newX |
final int | newY |
final int | oldX |
final int | oldY |
final Shape | shape |
Command for moving a shape to a new position. This is an implementation of the Command pattern.
Definition at line 9 of file MoveShapeCommand.java.
|
inline |
Constructor for the MoveShapeCommand
shape | the shape to move |
newX | the new x coordinate |
newY | the new y coordinate |
Definition at line 22 of file MoveShapeCommand.java.
|
inline |
Execute the command
Implements com.example.graphics.command.Command.
Definition at line 31 of file MoveShapeCommand.java.
|
inline |
Undo the command
Implements com.example.graphics.command.Command.
Definition at line 36 of file MoveShapeCommand.java.
|
private |
Definition at line 11 of file MoveShapeCommand.java.
Referenced by MoveShapeCommand(), and execute().
|
private |
Definition at line 12 of file MoveShapeCommand.java.
Referenced by MoveShapeCommand(), and execute().
|
private |
Definition at line 13 of file MoveShapeCommand.java.
Referenced by undo().
|
private |
Definition at line 14 of file MoveShapeCommand.java.
Referenced by undo().
|
private |
Definition at line 10 of file MoveShapeCommand.java.
Referenced by MoveShapeCommand(), execute(), and undo().