Gridarta Editor
net.sf.gridarta.action.AbstractMapCursorAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R > Class Template Referenceabstract

Abstract base class for actions that have to track the current map cursor. More...

+ Inheritance diagram for net.sf.gridarta.action.AbstractMapCursorAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
+ Collaboration diagram for net.sf.gridarta.action.AbstractMapCursorAction< 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)
 This event handler is called when the current map view has changed. More...
 
void mapCursorChangedGameObject (@Nullable final MapSquare< G, A, R > mapSquare, @Nullable final G gameObject)
 NoopMethodInAbstractClass More...
 
void mapCursorChangedMode ()
 This event handler is called when MapCursor changes mode (drag, select). More...
 
void mapCursorChangedPos (@NotNull final Point location)
 This event handler is called when MapCursor has moved. More...
 
void mapCursorChangedSize ()
 NoopMethodInAbstractClass More...
 
void mapViewClosing (@NotNull final MapView< G, A, R > mapView)
 NoopMethodInAbstractClass More...
 
void mapViewCreated (@NotNull final MapView< G, A, R > mapView)
 NoopMethodInAbstractClass More...
 

Protected Member Functions

MapCursor< G, A, R > getActiveMapCursor ()
 Return the map cursor of the current map view if it is active. More...
 
MapView< G, A, R > getActiveMapView ()
 Return the current map view. More...
 
abstract void updateAction ()
 Called whenever the current map cursor has changed. More...
 

Private Attributes

MapView< G, A, R > currentMapView
 The active map view, or. More...
 

Detailed Description

Abstract base class for actions that have to track the current map cursor.

Author
Andreas Kirschbaum

Definition at line 38 of file AbstractMapCursorAction.java.

Member Function Documentation

◆ activeMapViewChanged()

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

This event handler is called when the current map view has changed.

Parameters
mapViewthe new map view or
null
if no opened map view exists

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 72 of file AbstractMapCursorAction.java.

◆ getActiveMapCursor()

MapCursor<G, A, R> net.sf.gridarta.action.AbstractMapCursorAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getActiveMapCursor ( )
protected

Return the map cursor of the current map view if it is active.

Returns
the map cursor, or
null
if the cursor is not active, or if no map view exists

Definition at line 52 of file AbstractMapCursorAction.java.

◆ getActiveMapView()

MapView<G, A, R> net.sf.gridarta.action.AbstractMapCursorAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getActiveMapView ( )
protected

Return the current map view.

Returns
the current map view or
null

Definition at line 62 of file AbstractMapCursorAction.java.

◆ mapCursorChangedGameObject()

void net.sf.gridarta.action.AbstractMapCursorAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapCursorChangedGameObject ( @Nullable final MapSquare< G, A, R >  mapSquare,
@Nullable final G  gameObject 
)

◆ mapCursorChangedMode()

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

◆ mapCursorChangedPos()

void net.sf.gridarta.action.AbstractMapCursorAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapCursorChangedPos ( @NotNull final Point  location)

This event handler is called when MapCursor has moved.

Parameters
locationthe new location

Implements net.sf.gridarta.model.mapcursor.MapCursorListener< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.

Definition at line 94 of file AbstractMapCursorAction.java.

◆ mapCursorChangedSize()

◆ mapViewClosing()

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

◆ mapViewCreated()

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

◆ updateAction()

Member Data Documentation

◆ currentMapView

MapView<G, A, R> net.sf.gridarta.action.AbstractMapCursorAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.currentMapView
private

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