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>
EditorAction
that creates a new bookmark for the current map.Constructor and Description |
---|
AddBookmarkAction(@NotNull AbstractMapMenuPreferences bookmarksMapMenuPreferences)
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 |
addBookmark()
Action method for "addBookmark".
|
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 |
setAction(@NotNull javax.swing.Action action,
@NotNull java.lang.String name)
Sets the
Action instance for this editor action. |
public AddBookmarkAction(@NotNull @NotNull AbstractMapMenuPreferences bookmarksMapMenuPreferences)
bookmarksMapMenuPreferences
- the map menu preferences defining the
bookmarks menu entries@ActionMethod public void addBookmark()
public void setAction(@NotNull @NotNull javax.swing.Action action, @NotNull @NotNull java.lang.String name)
EditorAction
Action
instance for this editor action.setAction
in interface EditorAction
action
- the action instancename
- the name of the actionpublic void activeMapViewChanged(@Nullable @Nullable MapView<G,A,R> mapView)
MapViewManagerListener
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 @NotNull MapView<G,A,R> mapView)
MapViewManagerListener
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 @NotNull MapView<G,A,R> mapView)
MapViewManagerListener
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 closed