20 package net.sf.gridarta.action;
29 import net.
sf.japi.swing.action.ActionMethod;
30 import org.jetbrains.annotations.NotNull;
31 import org.jetbrains.annotations.Nullable;
46 super(selectedSquareModel, mapManager);
58 protected boolean doAction(
final boolean performAction, @Nullable
final G gameObject) {
59 if (gameObject == null || !gameObject.isHead() || gameObject.isBottom()) {
65 assert mapSquare != null;
69 gameObject.moveDown();
void moveSquareDown()
Action method for moving an arch down within its square.
MapSquare< G, A, R > getMapSquare()
A MapModel reflects the data of a map.
A MapManager manages all opened maps.
Graphical User Interface of Gridarta.
MapModel< G, A, R > getMapModel()
Returns the MapModel this map square is part of.
void endTransaction()
End a transaction.
Base package of all Gridarta classes.
MoveSquareDownAction(@NotNull final SelectedSquareModel< G, A, R > selectedSquareModel, @Nullable final MapManager< G, A, R > mapManager)
Creates a new instance.
MapModel< G, A, R > mapModel
The currently active MapModel.
An net.sf.gridarta.utils.EditorAction that moves the selected game object in the SelectedSquareModel ...
Abstract base class for actions that move the selected game object in the SelectedSquareModel.
Reflects a game object (object on a map).
final SelectedSquareModel< G, A, R > selectedSquareModel
The SelectedSquareModel that is updated.
boolean doAction(final boolean performAction, @Nullable final G gameObject)
GameObjects are the objects based on Archetypes found on maps.
Displays the contents of the currently selected map square.
void beginTransaction(@NotNull String name)
Starts a new transaction.
The model component of the selected square control.
Interface for MapArchObjects.