20 package net.sf.gridarta.action;
27 import net.
sf.japi.swing.action.ActionMethod;
28 import org.jetbrains.annotations.NotNull;
29 import org.jetbrains.annotations.Nullable;
50 super(selectedSquareModel, mapManager);
63 protected boolean doAction(
final boolean performAction, @Nullable
final G gameObject) {
64 if (gameObject == null || !gameObject.isHead()) {
68 G prevGameObject = gameObject.getPrev();
69 if (prevGameObject == null) {
70 prevGameObject = gameObject.getContainerGameObject();
71 if (prevGameObject == null) {
74 }
else if (performAction) {
76 final G tmp = prevGameObject.getFirst();
A MapManager manages all opened maps.
Graphical User Interface of Gridarta.
MoveSquarePrevAction(@NotNull final SelectedSquareModel< G, A, R > selectedSquareModel, @Nullable final MapManager< G, A, R > mapManager)
Creates a new instance.
final SelectedSquareModel< G, A, R > selectedSquareModel
The SelectedSquareModel that is updated.
An net.sf.gridarta.utils.EditorAction that selects the previous game object in the SelectedSquareMode...
boolean doAction(final boolean performAction, @Nullable final G gameObject)
Base package of all Gridarta classes.
Abstract base class for actions that move the selected game object in the SelectedSquareModel.
Reflects a game object (object on a map).
void moveSquarePrev()
Action method that selects the previous game object.
GameObjects are the objects based on Archetypes found on maps.
Displays the contents of the currently selected map square.
void setSelectedGameObject(@Nullable final G gameObject)
Sets the currently selected GameObject.
The model component of the selected square control.
Interface for MapArchObjects.