|
Gridarta Editor
|
Holds information to undo/redo one edit operation. More...
Collaboration diagram for net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:Public Member Functions | |
| A | getMapArchObject () |
| Returns the map arch object before the operation started. More... | |
| String | getName () |
| Return the name of the operation. More... | |
| SavedSquares< G, A, R > | getSavedSquares () |
| Returns the map squares that have changed in the operation. More... | |
| void | setSavedSquares (@NotNull final SavedSquares< G, A, R > savedSquares) |
| Records the affected map squares. More... | |
| UndoState (@NotNull final String name, @NotNull final A mapArchObject) | |
| Create a new instance. More... | |
Private Attributes | |
| final A | mapArchObject |
| The map arch object before the operation started. More... | |
| final String | name |
| The name of the operation. More... | |
| SavedSquares< G, A, R > | savedSquares |
| The affected map squares. More... | |
Holds information to undo/redo one edit operation.
It consists of the map model state, the map arch object state, and the name of the edit operation.
Definition at line 34 of file UndoState.java.
| net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.UndoState | ( | @NotNull final String | name, |
| @NotNull final A | mapArchObject | ||
| ) |
Create a new instance.
| name | the name of the operation |
| mapArchObject | the map arch object to store; the value is not copied |
Definition at line 61 of file UndoState.java.
References net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapArchObject, and net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.name.
| A net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapArchObject | ( | ) |
Returns the map arch object before the operation started.
Definition at line 109 of file UndoState.java.
Referenced by net.sf.gridarta.model.undo.UndoModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.finish(), and net.sf.gridarta.gui.undo.UndoControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.UndoControl().
Here is the caller graph for this function:| String net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getName | ( | ) |
Return the name of the operation.
Definition at line 71 of file UndoState.java.
Here is the caller graph for this function:| SavedSquares<G, A, R> net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getSavedSquares | ( | ) |
Returns the map squares that have changed in the operation.
| IllegalStateException | if no saved squares have been recorded |
Definition at line 97 of file UndoState.java.
| void net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setSavedSquares | ( | @NotNull final SavedSquares< G, A, R > | savedSquares | ) |
Records the affected map squares.
| savedSquares | the map squares to record |
| IllegalStateException | if changed map squares have been recorded before |
Definition at line 82 of file UndoState.java.
Referenced by net.sf.gridarta.model.undo.UndoModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.finish(), and net.sf.gridarta.gui.undo.UndoControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.UndoControl().
Here is the caller graph for this function:
|
private |
The map arch object before the operation started.
Definition at line 46 of file UndoState.java.
Referenced by net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapArchObject(), and net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.UndoState().
|
private |
The name of the operation.
Definition at line 40 of file UndoState.java.
Referenced by net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getName(), and net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.UndoState().
|
private |
The affected map squares.
The contents represent the state before the operation started.
Definition at line 53 of file UndoState.java.
Referenced by net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getSavedSquares(), and net.sf.gridarta.model.undo.UndoState< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setSavedSquares().