20 package net.sf.gridarta.gui.exitconnector;
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;
81 public void exitLocationChanged(@Nullable
final ExitLocation exitLocation) {
86 public void pasteExitNameChanged(
final boolean pasteExitName) {
91 public void autoCreateExitChanged(
final boolean pasteExitName) {
96 public void exitArchetypeNameChanged(@NotNull
final String exitArchetypeName) {
109 exitConnectorModel.addExitConnectorModelListener(exitConnectorModelListener);
140 if (aExitCopy != null) {
144 if (aExitPaste != null) {
148 if (aExitConnect != null) {
161 if (mapView == null) {
177 if (mapView == null) {
192 if (mapView == null) {
201 public void setAction(@NotNull
final Action action, @NotNull
final String name) {
202 if (name.equals(
"exitCopy")) {
204 }
else if (name.equals(
"exitPaste")) {
206 }
else if (name.equals(
"exitConnect")) {
207 aExitConnect = action;
209 throw new IllegalArgumentException();
216 currentMapView = mapView;
void exitPaste()
Action method for "paste exit".
Graphical User Interface of Gridarta.
void exitCopy()
Action method for "copy exit".
void mapViewCreated(@NotNull final MapView< G, A, R > mapView)
This event handler is called when a map view was created.
boolean doExitPaste(final boolean performAction)
Performs or checks availability of the "exit paste" action.
MapControl< G, A, R > getMapControl()
Return the controller of this view.
Action aExitConnect
The action for "connect exits".
final ExitConnectorModelListener exitConnectorModelListener
The ExitConnectorModelListener registered to the model.
ExitConnectorController(@NotNull final ExitConnectorActions< G, A, R > exitConnectorActions, @NotNull final ExitConnectorModel exitConnectorModel)
Creates a new instance.
Point getLocation()
Get position of cursor.
void exitConnect()
Action method for "connect exit".
Base package of all Gridarta classes.
Reflects a game object (object on a map).
boolean doExitCopy(final boolean performAction)
Performs or checks availability of the "exit copy" action.
void mapViewClosing(@NotNull final MapView< G, A, R > mapView)
This event handler is called when a map view is to be closed.
boolean doExitConnect(final boolean performAction, @NotNull final MapControl< G, A, R > mapControl, @NotNull final Point targetLocation)
Executes the "exit connect" action.
void activeMapViewChanged(@Nullable final MapView< G, A, R > mapView)
This event handler is called when the current map view has changed.
boolean doExitConnect(final boolean performAction)
Performs or checks availability of the "exit connect" action.
GameObjects are the objects based on Archetypes found on maps.
The controller of the exit connector.
Interface for listeners interested in events related to MapViewManager instances. ...
MapView< G, A, R > currentMapView
The active MapView or.
Base classes for rendering maps.
Utility class implementing actions that operate on ExitConnectorModels.
void setAction(@NotNull final Action action, @NotNull final String name)
Sets the Action instance for this editor action.
Stores information needed by the exit connector.
Action aExitCopy
The action for "copy exit".
Stores information about a remembered exit location.
MapCursor< G, A, R > getMapCursor()
Returns the MapCursor of this view.
boolean doExitCopy(final boolean performAction, @NotNull final MapControl< G, A, R > mapControl, @NotNull final Point location)
Executes the "exit copy" action.
A map view consists of a map grid and a map cursor, and is attached to a map control.
Action aExitPaste
The action for "paste exit".
void refreshActions()
Updates the enabled state of all actions.
final ExitConnectorActions< G, A, R > exitConnectorActions
The actions for this controller.
Interface for listeners interested in ExitConnectorModel related events.
boolean doExitPaste(final boolean performAction, @NotNull final MapControl< G, A, R > mapControl, @NotNull final Point targetLocation)
Executes the "exit paste" action.
Interface for MapArchObjects.