|
Gridarta Editor
|
An EditorAction that grows the current selection by one map square. More...
Inheritance diagram for net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
Collaboration diagram for net.sf.gridarta.action.GrowSelectionAction< 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 | growSelection () |
| Grows the current map selection by one map square. More... | |
| void | mapViewClosing (@NotNull final MapView< G, A, R > mapView) |
| This event handler is called when a map view is to be closed. More... | |
| void | mapViewCreated (@NotNull final MapView< G, A, R > mapView) |
| This event handler is called when a map view was created. More... | |
| void | setAction (@NotNull final Action action, @NotNull final String name) |
| Sets the Action instance for this editor action. More... | |
Private Member Functions | |
| boolean | doGrowSelection (final boolean performAction) |
| Grows the current map selection by one map square. More... | |
| void | updateAction () |
| Updates the action's enabled state. More... | |
Private Attributes | |
| Action | action |
| The action associated with this editor action. More... | |
| MapView< G, A, R > | currentMapView |
| The active map view, or. More... | |
| final MapGridListener | mapGridListener |
| The MapGridListener attached to currentMapView. More... | |
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 148 of file GrowSelectionAction.java.
References net.sf.gridarta.gui.map.mapview.MapView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapGrid(), and net.sf.gridarta.action.GrowSelectionAction< 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:
|
private |
Grows the current map selection by one map square.
| performAction | whether the action should be performed |
Definition at line 107 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().
Here is the call graph for this function:
Here is the caller graph for this function:| 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.
Here is the call graph for this function:| 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 164 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 160 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().
Here is the call graph for this function:
|
private |
Updates the action's enabled state.
Definition at line 95 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 >.setAction().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
The action associated with this editor action.
set to
if no action is associated.
Definition at line 58 of file GrowSelectionAction.java.
|
private |
The active map view, or.
if no map view exists.
Definition at line 51 of file GrowSelectionAction.java.
|
private |
The MapGridListener attached to currentMapView.
Definition at line 64 of file GrowSelectionAction.java.