public class ArchAttributesAction<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>
EditorAction
that opens the game object attributes dialog for the
currently selected game object.Constructor and Description |
---|
ArchAttributesAction(GameObjectAttributesDialogFactory<G,A,R> gameObjectAttributesDialogFactory)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
activeMapViewChanged(MapView<G,A,R> mapView)
This event handler is called when the current map view has changed.
|
void |
archAttributes()
Action method for "arch attributes".
|
void |
mapCursorChangedGameObject(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(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(MapView<G,A,R> mapView)
This event handler is called when a map view is to be closed.
|
void |
mapViewCreated(MapView<G,A,R> mapView)
This event handler is called when a map view was created.
|
void |
setAction(javax.swing.Action action,
java.lang.String name)
Sets the
Action instance for this editor action. |
public ArchAttributesAction(@NotNull GameObjectAttributesDialogFactory<G,A,R> gameObjectAttributesDialogFactory)
gameObjectAttributesDialogFactory
- the factory for creating game
object attributes dialog instances@ActionMethod public void archAttributes()
public void setAction(@NotNull javax.swing.Action action, @NotNull java.lang.String name)
Action
instance for this editor action.setAction
in interface EditorAction
action
- the action instancename
- the name of the actionpublic void activeMapViewChanged(@Nullable MapView<G,A,R> mapView)
activeMapViewChanged
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 MapView<G,A,R> mapView)
mapViewCreated
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 MapView<G,A,R> mapView)
mapViewClosing
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 java.awt.Point location)
MapCursor
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()
MapCursor
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 MapSquare<G,A,R> mapSquare, @Nullable G gameObject)
MapCursorListener.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()
mapCursorChangedSize
in interface MapCursorListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>