|
Gridarta Editor
|
Abstract base class for actions that move the selected game object in the SelectedSquareModel. More...
Inheritance diagram for net.sf.gridarta.action.AbstractMoveSquareAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
Collaboration diagram for net.sf.gridarta.action.AbstractMoveSquareAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:Public Member Functions | |
| boolean | doAction (final boolean performAction) |
| Executes the action. More... | |
| void | setAction (@NotNull final Action action, @NotNull final String name) |
| Sets the Action instance for this editor action. More... | |
Protected Member Functions | |
| AbstractMoveSquareAction (@NotNull final SelectedSquareModel< G, A, R > selectedSquareModel, @Nullable final MapManager< G, A, R > mapManager) | |
| Creates a new instance. More... | |
| abstract boolean | doAction (boolean performAction, @Nullable G gameObject) |
| Executes the action. More... | |
Private Member Functions | |
| void | setMapModel (@Nullable final MapModel< G, A, R > mapModel) |
| Called whether the current map has changed. More... | |
| void | updateAction () |
| Updates the enabled state of action. More... | |
Private Attributes | |
| Action | action |
| The Action for this instance. More... | |
| final MapManagerListener< G, A, R > | mapManagerListener |
| The map view manager listener. More... | |
| MapModel< G, A, R > | mapModel |
| The currently active MapModel. More... | |
| final MapModelListener< G, A, R > | mapModelListener |
| The MapModelListener attached to mapModel. More... | |
| final SelectedSquareModel< G, A, R > | selectedSquareModel |
| The SelectedSquareModel that is updated. More... | |
| final SelectedSquareModelListener< G, A, R > | selectedSquareModelListener |
| The SelectedSquareModelListener attached to selectedSquareModel. More... | |
Abstract base class for actions that move the selected game object in the SelectedSquareModel.
Definition at line 47 of file AbstractMoveSquareAction.java.
|
protected |
Creates a new instance.
| selectedSquareModel | the selected square model to update |
| mapManager | the map manager to track or null |
Definition at line 150 of file AbstractMoveSquareAction.java.
| boolean net.sf.gridarta.action.AbstractMoveSquareAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction | ( | final boolean | performAction | ) |
Executes the action.
| performAction | whether the action should be performed |
Definition at line 163 of file AbstractMoveSquareAction.java.
Referenced by net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.doAction(), and net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.updateAction().
Here is the caller graph for this function:
|
abstractprotected |
Executes the action.
| performAction | whether the action should be performed |
| gameObject | the current game object or null |
| void net.sf.gridarta.action.AbstractMoveSquareAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setAction | ( | @NotNull final Action | action, |
| @NotNull final String | name | ||
| ) |
Sets the Action instance for this editor action.
| action | the action instance |
| name | the name of the action |
Implements net.sf.gridarta.utils.EditorAction.
Definition at line 177 of file AbstractMoveSquareAction.java.
|
private |
Called whether the current map has changed.
Updates listeners attached to the current map.
| mapModel | the new map model |
Definition at line 197 of file AbstractMoveSquareAction.java.
|
private |
Updates the enabled state of action.
Definition at line 185 of file AbstractMoveSquareAction.java.
Referenced by net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.setAction(), and net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.setMapModel().
Here is the caller graph for this function:
|
private |
The Action for this instance.
May be
.
Definition at line 65 of file AbstractMoveSquareAction.java.
Referenced by net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.setAction().
|
private |
The map view manager listener.
Definition at line 71 of file AbstractMoveSquareAction.java.
|
private |
The currently active MapModel.
Definition at line 59 of file AbstractMoveSquareAction.java.
Referenced by net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.setMapModel().
|
private |
The MapModelListener attached to mapModel.
Definition at line 96 of file AbstractMoveSquareAction.java.
|
private |
The SelectedSquareModel that is updated.
Definition at line 53 of file AbstractMoveSquareAction.java.
Referenced by net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.AbstractMoveSquareAction().
|
private |
The SelectedSquareModelListener attached to selectedSquareModel.
Definition at line 136 of file AbstractMoveSquareAction.java.