 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.maincontrol;
22 import java.util.ArrayList;
23 import java.util.Collection;
24 import javax.swing.Action;
34 import net.
sf.japi.swing.action.ActionBuilder;
35 import net.
sf.japi.swing.action.ActionBuilderFactory;
36 import org.jetbrains.annotations.NotNull;
37 import org.jetbrains.annotations.Nullable;
58 private static final ActionBuilder
ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder(
"net.sf.gridarta");
89 if (tmpMapView !=
null) {
95 if (mapView !=
null) {
145 if (editorAction !=
null) {
168 throw new IllegalStateException(
"current map view is unset");
Base package of all Gridarta classes.
void createToggleAction(@NotNull final String name, @NotNull final String category, @NotNull final EditorAction editorAction)
Initializes a new action.
Interface for listeners interested in events related to {} instances.
Maintains a set of EditorAction instances and calls their event listener callbacks.
void createActionOptional(@NotNull final String name, @NotNull final String category, @Nullable final EditorAction editorAction)
Initializes a new action.
Reflects a game object (object on a map).
final Collection< MapCursorListener< G, A, R > > mapCursorListeners
The EditorActions that are interested in {} events.
Interface for listeners listening to MapCursor related events.
Utility class implementing Action related functions.
Graphical User Interface of Gridarta.
MapCursor< G, A, R > getMapCursor()
Returns the MapCursor of this view.
static final ActionBuilder ACTION_BUILDER
The ActionBuilder.
final MapViewManager< G, A, R > mapViewManager
The MapViewManager for tracking open maps.
EditorActionManager(@NotNull final MapViewManager< G, A, R > mapViewManager)
Creates a new instance.
GameObjects are the objects based on Archetypes found on maps.
final MapViewManagerListener< G, A, R > mapViewManagerListener
The map view manager listener used to detect changed current maps.
Interface for MapArchObjects.
A map view consists of a map grid and a map cursor, and is attached to a map control.
void removeMapCursorListener(@NotNull final MapCursorListener< G, A, R > listener)
Remove a MapCursorListener.
Action createAction(@NotNull final String name, @NotNull final String category, @NotNull final EditorAction editorAction)
Initializes a new action.
void addMapCursorListener(@NotNull final MapCursorListener< G, A, R > listener)
Register a MapCursorListener.
MapView< G, A, R > currentMapView
The active map view, or.
static Action newAction(@NotNull final ActionBuilder actionBuilder, @NotNull final String category, @NotNull final EditorAction editorAction, @NotNull final String key)
Creates a new Action instance.
static Action newToggleAction(@NotNull final ActionBuilder actionBuilder, @NotNull final String category, @NotNull final EditorAction editorAction, @NotNull final String key)
Creates a new Action instance.
Base classes for rendering maps.
MapView< G, A, R > getActiveMapView()
Returns the active top map view we are working with.
void addEditorAction(@NotNull final EditorAction editorAction)
Records the event types an EditorAction is interested in.
void addMapViewManagerListener(@NotNull final MapViewManagerListener< G, A, R > listener)
Adds a listener to be notified.