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

An EditorAction that runs the map validator on the current map. More...

+ Inheritance diagram for net.sf.gridarta.action.ValidateMapAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
+ Collaboration diagram for net.sf.gridarta.action.ValidateMapAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:

Public Member Functions

void setAction (@NotNull final Action action, @NotNull final String name)
 Sets the Action instance for this editor action. More...
 
void validateMap ()
 Runs the map validator on the current map. More...
 
 ValidateMapAction (@NotNull final DelegatingMapValidator< G, A, R > validators, @NotNull final MapManager< G, A, R > mapManager)
 Creates a new instance. More...
 

Private Member Functions

boolean doValidateMap (final boolean performAction)
 Executes the "validate map" action. More...
 
MapManagerListener< G, A, R > newMapManagerListener ()
 Creates a new MapManagerListener that refreshes the actions when the current map changes. More...
 
void updateActions ()
 Updates the state of the action. More...
 

Private Attributes

Action action
 The Action associated with this editor action. More...
 
MapControl< G, A, R > currentMapControl
 The last known active map, or. More...
 
final DelegatingMapValidator< G, A, R > validators
 The map validators. More...
 

Detailed Description

An EditorAction that runs the map validator on the current map.

Author
Andreas Kirschbaum

Definition at line 39 of file ValidateMapAction.java.

Constructor & Destructor Documentation

◆ ValidateMapAction()

net.sf.gridarta.action.ValidateMapAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.ValidateMapAction ( @NotNull final DelegatingMapValidator< G, A, R >  validators,
@NotNull final MapManager< G, A, R >  mapManager 
)

Member Function Documentation

◆ doValidateMap()

◆ newMapManagerListener()

MapManagerListener<G, A, R> net.sf.gridarta.action.ValidateMapAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.newMapManagerListener ( )
private

Creates a new MapManagerListener that refreshes the actions when the current map changes.

Returns
the map manager listener

Definition at line 66 of file ValidateMapAction.java.

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

Referenced by net.sf.gridarta.action.ValidateMapAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.ValidateMapAction().

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

◆ setAction()

void net.sf.gridarta.action.ValidateMapAction< 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.

Parameters
actionthe action instance
namethe name of the action

Implements net.sf.gridarta.utils.EditorAction.

Definition at line 113 of file ValidateMapAction.java.

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

◆ updateActions()

◆ validateMap()

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

Runs the map validator on the current map.

Definition at line 108 of file ValidateMapAction.java.

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

+ Here is the call graph for this function:

Member Data Documentation

◆ action

Action net.sf.gridarta.action.ValidateMapAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.action
private

The Action associated with this editor action.

Set to

null

if no action is associated.

Definition at line 52 of file ValidateMapAction.java.

Referenced by net.sf.gridarta.action.ValidateMapAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setAction().

◆ currentMapControl

MapControl<G, A, R> net.sf.gridarta.action.ValidateMapAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.currentMapControl
private

◆ validators


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