 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.action;
23 import javax.swing.Action;
39 import org.jetbrains.annotations.NotNull;
40 import org.jetbrains.annotations.Nullable;
75 setMapModel(mapControl ==
null ?
null : mapControl.getMapModel());
79 public void mapCreated(@NotNull
final MapControl<G, A, R> mapControl,
final boolean interactive) {
99 public void mapSizeChanged(@NotNull
final Size2D newSize) {
111 public void mapObjectsChanged(@NotNull
final Set<G> gameObjects, @NotNull
final Set<G> transientGameObjects) {
122 public void mapFileChanged(@Nullable
final MapFile oldMapFile) {
126 public void modifiedChanged() {
146 if (mapManager !=
null) {
156 public boolean doAction(
final boolean performAction) {
167 protected abstract boolean doAction(
boolean performAction, @Nullable G gameObject);
190 if (this.mapModel !=
null) {
194 if (this.mapModel !=
null) {
A MapModel reflects the data of a map.
A MapManager manages all opened maps.
Base package of all Gridarta classes.
Abstract base class for actions that move the selected game object in the SelectedSquareModel.
final MapManagerListener< G, A, R > mapManagerListener
The map manager listener.
Action action
The Action for this instance.
final SelectedSquareModel< G, A, R > selectedSquareModel
The SelectedSquareModel that is updated.
Interface for listeners listening to MapManager changes.
Reflects a game object (object on a map).
void addMapModelListener(@NotNull MapModelListener< G, A, R > listener)
Register a map listener.
boolean isSelectedGameObjects(@NotNull final Iterable< G > gameObjects)
Graphical User Interface of Gridarta.
GameObjects are the objects based on Archetypes found on maps.
AbstractMoveSquareAction(@NotNull final SelectedSquareModel< G, A, R > selectedSquareModel, @Nullable final MapManager< G, A, R > mapManager)
Creates a new instance.
Interface for listeners interested in events of SelectedSquareModel instances.
Interface for MapArchObjects.
The model component of the selected square control.
An interface for classes that collect errors.
boolean doAction(final boolean performAction)
Executes the action.
void setAction(@NotNull final Action action, @NotNull final String name)
Sets the Action instance for this editor action.
This package contains the framework for validating maps.
The location of a map file with a map directory.
final MapModelListener< G, A, R > mapModelListener
The MapModelListener attached to mapModel.
Interface for listeners listening on MapModel events.
void addSelectedSquareListener(@NotNull final SelectedSquareModelListener< G, A, R > listener)
Adds a SelectedSquareModelListener to be notified.
MapModel< G, A, R > mapModel
The currently active MapModel.
Currently nothing more than a marker interface for unification.
boolean isSelectedMapSquares(@NotNull final Iterable< MapSquare< G, A, R >> mapSquares)
G getSelectedGameObject()
Returns the currently selected GameObject within this list (currently selected MapSquare).
Displays the contents of the currently selected map square.
void setMapModel(@Nullable final MapModel< G, A, R > mapModel)
Called whether the current map has changed.
final SelectedSquareModelListener< G, A, R > selectedSquareModelListener
The SelectedSquareModelListener attached to {}.
The class Size2D represents a 2d rectangular area.
void updateAction()
Updates the enabled state of action.