Gridarta Editor
|
Public Member Functions | |
void | activeMapViewChanged (@Nullable final MapView< G, A, R > mapView) |
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) |
void | shrinkSelection () |
Private Member Functions | |
boolean | doShrinkSelection (final boolean performAction) |
void | updateAction () |
Private Attributes | |
Action | action |
MapView< G, A, R > | currentMapView |
final MapGridListener | mapGridListener |
An EditorAction that shrinks the current selection by one map square.
Definition at line 48 of file ShrinkSelectionAction.java.
void net.sf.gridarta.action.ShrinkSelectionAction< 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 159 of file ShrinkSelectionAction.java.
References net.sf.gridarta.model.mapgrid.MapGrid.addMapGridListener(), net.sf.gridarta.action.ShrinkSelectionAction< 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.ShrinkSelectionAction< 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.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateAction().
|
private |
Shrinks the current map selection by one map square.
performAction | whether the action should be performed |
Definition at line 109 of file ShrinkSelectionAction.java.
References net.sf.gridarta.model.mapgrid.MapGrid.beginTransaction(), net.sf.gridarta.action.ShrinkSelectionAction< 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.mapgrid.MapGrid.getFlags(), 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.mapgrid.MapGrid.GRID_FLAG_SELECTION, net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.isPointValid(), net.sf.gridarta.model.mapgrid.MapGrid.select(), and net.sf.gridarta.model.mapgrid.SelectionMode.SUB.
Referenced by net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.shrinkSelection(), and net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateAction().
void net.sf.gridarta.action.ShrinkSelectionAction< 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 176 of file ShrinkSelectionAction.java.
void net.sf.gridarta.action.ShrinkSelectionAction< 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 171 of file ShrinkSelectionAction.java.
void net.sf.gridarta.action.ShrinkSelectionAction< 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 90 of file ShrinkSelectionAction.java.
References net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.action, and net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateAction().
void net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.shrinkSelection | ( | ) |
Grows the current map selection by one map square.
Definition at line 85 of file ShrinkSelectionAction.java.
|
private |
Updates the action's enabled state.
Definition at line 98 of file ShrinkSelectionAction.java.
References net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.action, and net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doShrinkSelection().
Referenced by net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.activeMapViewChanged(), and net.sf.gridarta.action.ShrinkSelectionAction< 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 61 of file ShrinkSelectionAction.java.
Referenced by net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setAction(), and net.sf.gridarta.action.ShrinkSelectionAction< 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 54 of file ShrinkSelectionAction.java.
Referenced by net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.activeMapViewChanged(), and net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doShrinkSelection().
|
private |
The MapGridListener attached to currentMapView.
Definition at line 67 of file ShrinkSelectionAction.java.