Package net.sf.gridarta.action
Class AddBookmarkAction<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.action.AddBookmarkAction<G,A,R>
-
- All Implemented Interfaces:
MapViewManagerListener<G,A,R>,EditorAction
public class AddBookmarkAction<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements EditorAction, MapViewManagerListener<G,A,R>
AnEditorActionthat creates a new bookmark for the current map.
-
-
Constructor Summary
Constructors Constructor Description AddBookmarkAction(@NotNull AbstractMapMenuPreferences bookmarksMapMenuPreferences)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.voidaddBookmark()Action method for "addBookmark".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
-
AddBookmarkAction
public AddBookmarkAction(@NotNull @NotNull AbstractMapMenuPreferences bookmarksMapMenuPreferences)Creates a new instance.- Parameters:
bookmarksMapMenuPreferences- the map menu preferences defining the bookmarks menu entries
-
-
Method Detail
-
addBookmark
@ActionMethod public void addBookmark()
Action method for "addBookmark". Creates a new bookmark for the currently opened map.
-
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
-
-