Gridarta Editor
net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R > Class Template Reference
+ Inheritance diagram for net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
+ Collaboration diagram for net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:

Public Member Functions

void activeMapViewChanged (@Nullable final MapView< G, A, R > mapView)
 
void addBookmark ()
 
 AddBookmarkAction (@NotNull final AbstractMapMenuPreferences bookmarksMapMenuPreferences)
 
void mapViewClosing (@NotNull final MapView< G, A, R > mapView)
 
void mapViewCreated (@NotNull final MapView< G, A, R > mapView)
 
void setAction (@NotNull final Action action, @NotNull final String name)
 

Private Member Functions

boolean doAddBookmark (final boolean performAction)
 
void updateAction ()
 

Private Attributes

Action action
 
final AbstractMapMenuPreferences bookmarksMapMenuPreferences
 
MapView< G, A, R > currentMapView
 

Detailed Description

An EditorAction that creates a new bookmark for the current map.

Author
Andreas Kirschbaum

Definition at line 43 of file AddBookmarkAction.java.

Constructor & Destructor Documentation

◆ AddBookmarkAction()

net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.AddBookmarkAction ( @NotNull final AbstractMapMenuPreferences  bookmarksMapMenuPreferences)

Creates a new instance.

Parameters
bookmarksMapMenuPreferencesthe map menu preferences defining the bookmarks menu entries

Definition at line 69 of file AddBookmarkAction.java.

References net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.bookmarksMapMenuPreferences.

Member Function Documentation

◆ activeMapViewChanged()

void net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.activeMapViewChanged ( @Nullable final MapView< G, A, R >  mapView)

◆ addBookmark()

void net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addBookmark ( )

Action method for "addBookmark". Creates a new bookmark for the currently opened map.

Definition at line 78 of file AddBookmarkAction.java.

References net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAddBookmark().

+ Here is the call graph for this function:

◆ doAddBookmark()

boolean net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAddBookmark ( final boolean  performAction)
private

Preforms the action "add bookmark".

Parameters
performActionwhether the action should be performed
Returns
whether the action has or can be performed

Definition at line 102 of file AddBookmarkAction.java.

References net.sf.gridarta.gui.mapmenu.MapMenuPreferences.addEntry(), net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.bookmarksMapMenuPreferences, net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.currentMapView, net.sf.gridarta.gui.dialog.bookmarks.EditBookmarkDialog.getDescription(), net.sf.gridarta.gui.map.mapview.MapView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getInternalFrame(), net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapArchObject(), net.sf.gridarta.gui.map.mapview.MapView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapControl(), net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapFile(), net.sf.gridarta.model.mapcontrol.MapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapModel(), and net.sf.gridarta.gui.dialog.bookmarks.EditBookmarkDialog.showDialog().

Referenced by net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addBookmark(), and net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateAction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mapViewClosing()

void net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapViewClosing ( @NotNull final MapView< G, A, R >  mapView)

This event handler is called when a map view is to be closed.

Parameters
mapViewthe map view that is to be closed

Implements net.sf.gridarta.gui.map.mapview.MapViewManagerListener< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.

Definition at line 138 of file AddBookmarkAction.java.

◆ mapViewCreated()

void net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapViewCreated ( @NotNull final MapView< G, A, R >  mapView)

This event handler is called when a map view was created.

Parameters
mapViewthe created map view

Implements net.sf.gridarta.gui.map.mapview.MapViewManagerListener< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.

Definition at line 134 of file AddBookmarkAction.java.

◆ setAction()

void net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setAction ( @NotNull final Action  action,
@NotNull final String  name 
)

◆ updateAction()

Member Data Documentation

◆ action

◆ bookmarksMapMenuPreferences

◆ currentMapView


The documentation for this class was generated from the following file: