20 package net.sf.gridarta.action;
22 import java.awt.Point;
23 import javax.swing.Action;
34 import net.
sf.japi.swing.action.ActionMethod;
35 import org.jetbrains.annotations.NotNull;
36 import org.jetbrains.annotations.Nullable;
43 public class ArchAttributesAction<G
extends GameObject<G, A, R>, A extends
MapArchObject<A>, R extends
Archetype<G, A, R>> implements
EditorAction,
MapCursorListener<G, A, R>,
MapViewManagerListener<G, A, R> {
83 public void setAction(@NotNull
final Action action, @NotNull
final String name) {
103 if (currentMapView == null) {
109 if (gameObject == null) {
122 currentMapView = mapView;
void mapCursorChangedGameObject(@Nullable final MapSquare< G, A, R > mapSquare, @Nullable final G gameObject)
Called whenever the selected game object has changed.
Graphical User Interface of Gridarta.
void mapViewCreated(@NotNull final MapView< G, A, R > mapView)
This event handler is called when a map view was created.
void setAction(@NotNull final Action action, @NotNull final String name)
Sets the Action instance for this editor action.
void mapCursorChangedMode()
This event handler is called when MapCursor changes mode (drag, select).
void activeMapViewChanged(@Nullable final MapView< G, A, R > mapView)
This event handler is called when the current map view has changed.
A factory that creates dialogs for editing game object attributes.
Action action
The associated Action.
void mapViewClosing(@NotNull final MapView< G, A, R > mapView)
This event handler is called when a map view is to be closed.
G getGameObject()
Returns the selected GameObject.
MapCursor provides methods to move and drag on map.
ArchAttributesAction(@NotNull final GameObjectAttributesDialogFactory< G, A, R > gameObjectAttributesDialogFactory)
Creates a new instance.
final GameObjectAttributesDialogFactory< G, A, R > gameObjectAttributesDialogFactory
The factory for creating game object attributes dialog instances.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
void mapCursorChangedSize()
Called whenever the map cursor's map grid size has changed.
An EditorAction that opens the game object attributes dialog for the currently selected game object...
GameObjects are the objects based on Archetypes found on maps.
Interface for listeners interested in events related to MapViewManager instances. ...
void mapCursorChangedPos(@NotNull final Point location)
This event handler is called when MapCursor has moved.
boolean doArchAttributes(final boolean performAction)
Executes the "arch attributes" action.
MapView< G, A, R > currentMapView
The active map view, or.
Base classes for rendering maps.
void updateActions()
Updates the enabled state of action.
MapCursor< G, A, R > getMapCursor()
Returns the MapCursor of this view.
A map view consists of a map grid and a map cursor, and is attached to a map control.
void archAttributes()
Action method for "arch attributes".
Interface for listeners listening to MapCursor related events.
void showAttributeDialog(@NotNull final G gameObject)
Shows the game object attributes dialog for a given GameObject instance.
Interface for MapArchObjects.