Gridarta Editor
|
Public Member Functions | |
void | activeMapViewChanged (@Nullable final MapView< G, A, R > mapView) |
void | growSelection () |
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 | doGrowSelection (final boolean performAction) |
void | updateAction () |
Private Attributes | |
Action | action |
MapView< G, A, R > | currentMapView |
final MapGridListener | mapGridListener |
An EditorAction that grows the current selection by one map square.
Definition at line 45 of file GrowSelectionAction.java.
void net.sf.gridarta.action.GrowSelectionAction< 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.
mapView | the new map view or null
|
Definition at line 147 of file GrowSelectionAction.java.
References net.sf.gridarta.model.mapgrid.MapGrid.addMapGridListener(), net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.currentMapView, net.sf.gridarta.gui.map.mapview.MapView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapGrid(), net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapGridListener, net.sf.gridarta.model.mapgrid.MapGrid.removeMapGridListener(), and net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateAction().
|
private |
Grows the current map selection by one map square.
performAction | whether the action should be performed |
Definition at line 106 of file GrowSelectionAction.java.
References net.sf.gridarta.model.mapgrid.SelectionMode.ADD, net.sf.gridarta.model.mapgrid.MapGrid.beginTransaction(), net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.currentMapView, net.sf.gridarta.model.mapgrid.MapGrid.endTransaction(), 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.gui.map.mapview.MapView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapGrid(), net.sf.gridarta.model.mapcontrol.MapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapModel(), net.sf.gridarta.model.mapgrid.MapGrid.getSelectedRec(), net.sf.gridarta.gui.map.mapview.MapView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getSelectedSquares(), net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.isPointValid(), and net.sf.gridarta.model.mapgrid.MapGrid.select().
Referenced by net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.growSelection(), and net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateAction().
void net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.growSelection | ( | ) |
Grows the current map selection by one map square.
Definition at line 82 of file GrowSelectionAction.java.
void net.sf.gridarta.action.GrowSelectionAction< 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.
mapView | the map view that is to be closed |
Definition at line 163 of file GrowSelectionAction.java.
void net.sf.gridarta.action.GrowSelectionAction< 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.
mapView | the created map view |
Definition at line 159 of file GrowSelectionAction.java.
void net.sf.gridarta.action.GrowSelectionAction< 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 | ||
) |
Sets the Action instance for this editor action.
action | the action instance |
name | the name of the action |
Implements net.sf.gridarta.utils.EditorAction.
Definition at line 87 of file GrowSelectionAction.java.
References net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.action, and net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateAction().
|
private |
Updates the action's enabled state.
Definition at line 95 of file GrowSelectionAction.java.
References net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.action, and net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doGrowSelection().
Referenced by net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.activeMapViewChanged(), and net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setAction().
|
private |
The action associated with this editor action. set to
if no action is associated.
Definition at line 58 of file GrowSelectionAction.java.
Referenced by net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setAction(), and net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateAction().
|
private |
The active map view, or
if no map view exists.
Definition at line 51 of file GrowSelectionAction.java.
Referenced by net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.activeMapViewChanged(), and net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doGrowSelection().
|
private |
The MapGridListener attached to currentMapView.
Definition at line 64 of file GrowSelectionAction.java.