 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.gui.mapdesktop;
22 import java.awt.event.ActionEvent;
24 import javax.swing.AbstractAction;
25 import javax.swing.KeyStroke;
38 import org.jetbrains.annotations.NotNull;
39 import org.jetbrains.annotations.Nullable;
86 public void mapCreated(@NotNull
final MapControl<G, A, R> mapControl,
final boolean interactive) {
111 public void mapSizeChanged(@NotNull
final Size2D newSize) {
121 public void mapObjectsChanged(@NotNull
final Set<G> gameObjects, @NotNull
final Set<G> transientGameObjects) {
131 public void mapFileChanged(@Nullable
final MapFile oldMapFile) {
136 public void modifiedChanged() {
166 putValue(MNEMONIC_KEY, KeyStroke.getKeyStroke(Integer.toString(
index % 10)).getKeyCode());
167 putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(
"ctrl pressed " +
index % 10));
169 putValue(MNEMONIC_KEY,
null);
170 putValue(ACCELERATOR_KEY,
null);
180 putValue(NAME, 0 <=
index &&
index <= 10 ?
index +
": " + windowTitle : windowTitle);
194 }
catch (
final CloneNotSupportedException ex) {
195 throw new AssertionError(ex);
WindowAction(@NotNull final MapDesktop< G, A, R > mapDesktop, @NotNull final MapView< G, A, R > mapView, @NotNull final MapManager< G, A, R > mapManager)
Creates a new instance.
A MapManager manages all opened maps.
void removeMapManagerListener(@NotNull MapManagerListener< G, A, R > listener)
Removes a MapManagerListener to be notified.
MapControl< G, A, R > getMapControl()
Return the controller of this view.
Base package of all Gridarta classes.
void actionPerformed(@NotNull final ActionEvent e)
int index
The index of this action.
Interface for listeners listening to MapManager changes.
void addMapManagerListener(@NotNull MapManagerListener< G, A, R > listener)
Adds a MapManagerListener to be notified.
Reflects a game object (object on a map).
final MapManagerListener< G, A, R > mapManagerListener
The MapManagerListener to detect closed maps.
final void setIndex(final int index)
Sets the index of this action so this Action knows what Mnemonic and Accelerator to use.
void addMapModelListener(@NotNull MapModelListener< G, A, R > listener)
Register a map listener.
Action class for selecting this window.
void updateName()
Updates the action's name to the current map state.
void setCurrentMapView(@NotNull final MapView< G, A, R > mapView)
Sets the given level view as the current one.
Graphical User Interface of Gridarta.
GameObjects are the objects based on Archetypes found on maps.
static final long serialVersionUID
The serial version UID.
String getWindowTitle()
Returns the title for the map window.
final MapView< G, A, R > mapView
The associated map view.
void removeMapModelListener(@NotNull MapModelListener< G, A, R > listener)
Unregister a map listener.
Interface for MapArchObjects.
An interface for classes that collect errors.
A map view consists of a map grid and a map cursor, and is attached to a map control.
This package contains the framework for validating maps.
final MapManager< G, A, R > mapManager
The MapManager to use.
The location of a map file with a map directory.
final MapDesktop< G, A, R > mapDesktop
The map desktop.
Interface for listeners listening on MapModel events.
JInternalFrame getInternalFrame()
Returns the JInternalFrame instance for this map view.
Base classes for rendering maps.
Currently nothing more than a marker interface for unification.
MapModel< G, A, R > getMapModel()
Returns the map model.
WindowAction< G, A, R > clone()
The class Size2D represents a 2d rectangular area.
final MapModelListener< G, A, R > mapModelListener
The MapModelListener to detect modified maps.