Package net.sf.gridarta.action
Class ArchAttributesAction<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.action.ArchAttributesAction<G,A,R>
-
- All Implemented Interfaces:
java.util.EventListener,MapViewManagerListener<G,A,R>,MapCursorListener<G,A,R>,EditorAction
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>
AnEditorActionthat opens the game object attributes dialog for the currently selected game object.
-
-
Constructor Summary
Constructors Constructor Description ArchAttributesAction(@NotNull GameObjectAttributesDialogFactory<G,A,R> gameObjectAttributesDialogFactory)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactiveMapViewChanged(@Nullable MapView<G,A,R> mapView)This event handler is called when the current map view has changed.voidarchAttributes()Action method for "arch attributes".voidmapCursorChangedGameObject(@Nullable MapSquare<G,A,R> mapSquare, G gameObject)Called whenever the selected game object has changed.voidmapCursorChangedMode()This event handler is called whenMapCursorchanges mode (drag, select).voidmapCursorChangedPos(@NotNull java.awt.Point location)This event handler is called whenMapCursorhas moved.voidmapCursorChangedSize()Called whenever the map cursor's map grid size has changed.voidmapViewClosing(@NotNull MapView<G,A,R> mapView)This event handler is called when a map view is to be closed.voidmapViewCreated(@NotNull MapView<G,A,R> mapView)This event handler is called when a map view was created.voidsetAction(@NotNull javax.swing.Action action, @NotNull java.lang.String name)Sets theActioninstance for this editor action.
-
-
-
Constructor Detail
-
ArchAttributesAction
public ArchAttributesAction(@NotNull @NotNull GameObjectAttributesDialogFactory<G,A,R> gameObjectAttributesDialogFactory)Creates a new instance.- Parameters:
gameObjectAttributesDialogFactory- the factory for creating game object attributes dialog instances
-
-
Method Detail
-
archAttributes
@ActionMethod public void archAttributes()
Action method for "arch attributes".
-
setAction
public void setAction(@NotNull @NotNull javax.swing.Action action, @NotNull @NotNull java.lang.String name)Description copied from interface:EditorActionSets theActioninstance for this editor action.- Specified by:
setActionin interfaceEditorAction- Parameters:
action- the action instancename- the name of the action
-
activeMapViewChanged
public void activeMapViewChanged(@Nullable @Nullable MapView<G,A,R> mapView)Description copied from interface:MapViewManagerListenerThis event handler is called when the current map view has changed.- Specified by:
activeMapViewChangedin interfaceMapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
mapView- the new map view ornullif no opened map view exists
-
mapViewCreated
public void mapViewCreated(@NotNull @NotNull MapView<G,A,R> mapView)Description copied from interface:MapViewManagerListenerThis event handler is called when a map view was created.- Specified by:
mapViewCreatedin interfaceMapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
mapView- the created map view
-
mapViewClosing
public void mapViewClosing(@NotNull @NotNull MapView<G,A,R> mapView)Description copied from interface:MapViewManagerListenerThis event handler is called when a map view is to be closed.- Specified by:
mapViewClosingin interfaceMapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
mapView- the map view that is to be closed
-
mapCursorChangedPos
public void mapCursorChangedPos(@NotNull @NotNull java.awt.Point location)Description copied from interface:MapCursorListenerThis event handler is called whenMapCursorhas moved.- Specified by:
mapCursorChangedPosin interfaceMapCursorListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
location- the new location
-
mapCursorChangedMode
public void mapCursorChangedMode()
Description copied from interface:MapCursorListenerThis event handler is called whenMapCursorchanges mode (drag, select).- Specified by:
mapCursorChangedModein interfaceMapCursorListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
-
mapCursorChangedGameObject
public void mapCursorChangedGameObject(@Nullable @Nullable MapSquare<G,A,R> mapSquare, @Nullable G gameObject)Description copied from interface:MapCursorListenerCalled whenever the selected game object has changed. This function is not called ifMapCursorListener.mapCursorChangedPos(Point)occurs concurrently.- Specified by:
mapCursorChangedGameObjectin interfaceMapCursorListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
mapSquare- the newly selected map square ornullif no map square is selectedgameObject- the newly selected game object ornullif no game object is selected
-
mapCursorChangedSize
public void mapCursorChangedSize()
Description copied from interface:MapCursorListenerCalled whenever the map cursor's map grid size has changed.- Specified by:
mapCursorChangedSizein interfaceMapCursorListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
-
-