Gridarta Editor
|
Public Member Functions | |
boolean | doAction (final boolean performAction) |
void | setAction (@NotNull final Action action, @NotNull final String name) |
Protected Member Functions | |
AbstractMoveSquareAction (@NotNull final SelectedSquareModel< G, A, R > selectedSquareModel, @Nullable final MapManager< G, A, R > mapManager) | |
abstract boolean | doAction (boolean performAction, @Nullable G gameObject) |
Private Member Functions | |
void | setMapModel (@Nullable final MapModel< G, A, R > mapModel) |
void | updateAction () |
Private Attributes | |
Action | action |
final MapManagerListener< G, A, R > | mapManagerListener |
MapModel< G, A, R > | mapModel |
final MapModelListener< G, A, R > | mapModelListener |
final SelectedSquareModel< G, A, R > | selectedSquareModel |
final SelectedSquareModelListener< G, A, R > | selectedSquareModelListener |
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.
|
abstractprotected |
Executes the action.
performAction | whether the action should be performed |
gameObject | the current game object or null
|
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(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti3(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti4(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle2(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle3(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvIntoHead1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvMulti1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvSingle1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testMoveEnvIntoSelectedMapSquare(), net.sf.gridarta.action.SelectedSquareActionsTest.testMoveTailPart(), and net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.updateAction().
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 196 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().
|
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(), and net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.updateAction().
|
private |
The map manager listener.
Definition at line 71 of file AbstractMoveSquareAction.java.
Referenced by net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.AbstractMoveSquareAction().
|
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.
Referenced by net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.setMapModel().
|
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(), and net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.doAction().
|
private |
The SelectedSquareModelListener attached to {}.
Definition at line 136 of file AbstractMoveSquareAction.java.
Referenced by net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.AbstractMoveSquareAction().