 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.action;
22 import java.awt.Point;
30 import net.
sf.japi.swing.action.ActionMethod;
31 import org.jetbrains.annotations.NotNull;
32 import org.jetbrains.annotations.Nullable;
66 protected boolean doAction(
final boolean performAction, @Nullable
final G gameObject) {
67 if (gameObject ==
null || !gameObject.isHead()) {
71 final G envGameObject = gameObject.getContainerGameObject();
72 if (envGameObject ==
null) {
77 if (mapSquare ==
null) {
A MapModel reflects the data of a map.
A MapManager manages all opened maps.
Point getMapLocation()
Returns the coordinate on the map.
An net.sf.gridarta.utils.EditorAction that moves the selected game object in the SelectedSquareModel ...
Base package of all Gridarta classes.
Abstract base class for actions that move the selected game object in the SelectedSquareModel.
void endTransaction()
End a transaction.
void beginTransaction(@NotNull String name)
Starts a new transaction.
boolean isMultiArchFittingToMap(@NotNull Archetype< G, A, R > archetype, @NotNull Point pos, boolean allowDouble)
Checks whether a GameObject (multi-arch) would still fit on this map.
Reflects a game object (object on a map).
final SelectedSquareModel< G, A, R > selectedSquareModel
The SelectedSquareModel that is updated.
Graphical User Interface of Gridarta.
GameObjects are the objects based on Archetypes found on maps.
Interface for MapArchObjects.
The model component of the selected square control.
void moveEnv(@NotNull G gameObject, @NotNull Point pos, @NotNull G nextGameObject)
Moves a GameObject to its environment.
MapModel< G, A, R > getMapModel()
Returns the MapModel this map square is part of.
MoveSquareEnvAction(@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.
void moveSquareEnv()
Action method that moves the selected game object to its environment.
Displays the contents of the currently selected map square.
boolean doAction(final boolean performAction, @Nullable final G gameObject)
MapSquare< G, A, R > getSelectedMapSquare()
Returns the currently selected map square.