20 package net.sf.gridarta.action;
22 import javax.swing.Action;
31 import net.
sf.japi.swing.action.ActionMethod;
32 import org.jetbrains.annotations.NotNull;
33 import org.jetbrains.annotations.Nullable;
72 public void setAction(@NotNull
final Action action, @NotNull
final String name) {
92 return mapCursor != null && gameObject != null && mapCursor.
insertGameObject(performAction, gameObject,
false, mapViewSettings.
isAutojoin());
Action action
The Action associated with this editor action.
void setAction(@NotNull final Action action, @NotNull final String name)
Sets the Action instance for this editor action.
MapCursor< G, A, R > getActiveMapCursor()
Return the map cursor of the current map view if it is active.
boolean doInsertArch(final boolean performAction)
Executes the "insert arch" action.
boolean isAutojoin()
Returns whether "autojoin" is enabled.
Graphical User Interface of Gridarta.
InsertArchAction(@NotNull final ObjectChooser< G, A, R > objectChooser, @NotNull final MapViewSettings mapViewSettings)
Creates a new instance.
BaseObject< G, A, R, ?> getSelection()
Returns the active arch in the left-side panel.
MapCursor provides methods to move and drag on map.
final ObjectChooser< G, A, R > objectChooser
The object chooser.
Base package of all Gridarta classes.
An EditorAction that inserts a new game object into the current map.
Reflects a game object (object on a map).
void insertArch()
Action method for "insert arch".
Container for settings that affect the rendering of maps.
GameObjects are the objects based on Archetypes found on maps.
boolean insertGameObject(final boolean performAction, @NotNull final BaseObject< G, A, R, ?> gameObject, final boolean insertAtEnd, final boolean join)
Inserts a GameObject before the selected game object.
Common base interface for ObjectChoosers.
Abstract base class for actions that have to track the current map cursor.
final MapViewSettings mapViewSettings
The MapViewSettings instance for looking up options.
Interface for MapArchObjects.