public class MapCursorActions<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements EditorAction, MapCursorListener<G,A,R>, MapViewManagerListener<G,A,R>
| Constructor and Description |
|---|
MapCursorActions(@NotNull MapActions<G,A,R> mapActions)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activeMapViewChanged(@Nullable MapView<G,A,R> mapView)
This event handler is called when the current map view has changed.
|
void |
mapCursorChangedGameObject(@Nullable MapSquare<G,A,R> mapSquare,
G gameObject)
Called whenever the selected game object has changed.
|
void |
mapCursorChangedMode()
This event handler is called when
MapCursor changes mode (drag,
select). |
void |
mapCursorChangedPos(@NotNull java.awt.Point location)
This event handler is called when
MapCursor has moved. |
void |
mapCursorChangedSize()
Called whenever the map cursor's map grid size has changed.
|
void |
mapViewClosing(@NotNull MapView<G,A,R> mapView)
This event handler is called when a map view is to be closed.
|
void |
mapViewCreated(@NotNull MapView<G,A,R> mapView)
This event handler is called when a map view was created.
|
void |
moveCursorEast()
Action method for "move cursor east".
|
void |
moveCursorNorth()
Action method for "move cursor north".
|
void |
moveCursorNorthEast()
Action method for "move cursor north east".
|
void |
moveCursorNorthWest()
Action method for "move cursor north west".
|
void |
moveCursorSouth()
Action method for "move cursor south".
|
void |
moveCursorSouthEast()
Action method for "move cursor south east".
|
void |
moveCursorSouthWest()
Action method for "move cursor south west".
|
void |
moveCursorWest()
Action method for "move cursor west".
|
void |
setAction(@NotNull javax.swing.Action action,
@NotNull java.lang.String name)
Sets the
Action instance for this editor action. |
public MapCursorActions(@NotNull
@NotNull MapActions<G,A,R> mapActions)
@ActionMethod public void moveCursorNorth()
@ActionMethod public void moveCursorSouth()
@ActionMethod public void moveCursorEast()
@ActionMethod public void moveCursorWest()
@ActionMethod public void moveCursorNorthEast()
@ActionMethod public void moveCursorNorthWest()
@ActionMethod public void moveCursorSouthEast()
@ActionMethod public void moveCursorSouthWest()
public void setAction(@NotNull
@NotNull javax.swing.Action action,
@NotNull
@NotNull java.lang.String name)
EditorActionAction instance for this editor action.setAction in interface EditorActionaction - the action instancename - the name of the actionpublic void activeMapViewChanged(@Nullable
@Nullable MapView<G,A,R> mapView)
MapViewManagerListeneractiveMapViewChanged in interface MapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>mapView - the new map view or null if no opened map view
existspublic void mapViewCreated(@NotNull
@NotNull MapView<G,A,R> mapView)
MapViewManagerListenermapViewCreated in interface MapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>mapView - the created map viewpublic void mapViewClosing(@NotNull
@NotNull MapView<G,A,R> mapView)
MapViewManagerListenermapViewClosing in interface MapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>mapView - the map view that is to be closedpublic void mapCursorChangedPos(@NotNull
@NotNull java.awt.Point location)
MapCursorListenerMapCursor has moved.mapCursorChangedPos in interface MapCursorListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>location - the new locationpublic void mapCursorChangedMode()
MapCursorListenerMapCursor changes mode (drag,
select).mapCursorChangedMode in interface MapCursorListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>public void mapCursorChangedGameObject(@Nullable
@Nullable MapSquare<G,A,R> mapSquare,
@Nullable
G gameObject)
MapCursorListenerMapCursorListener.mapCursorChangedPos(Point) occurs
concurrently.mapCursorChangedGameObject in interface MapCursorListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>mapSquare - the newly selected map square or null if no map
square is selectedgameObject - the newly selected game object or null if no
game object is selectedpublic void mapCursorChangedSize()
MapCursorListenermapCursorChangedSize in interface MapCursorListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>