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

An EditorAction that runs the archetype collection. More...

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

Public Member Functions

void collectArches ()
 Runs the archetype collection. More...
 
 CollectArchesAction (@NotNull final ProjectSettings projectSettings, @NotNull final AbstractResources< G, A, R > resources, @NotNull final Exiter exiter, @NotNull final JFrame parent)
 Creates a new instance. More...
 
void setAction (@NotNull final Action action, @NotNull final String name)
 Sets the Action instance for this editor action. More...
 

Private Member Functions

boolean doCollectArches (final boolean performAction)
 Executes the "collect arches" action. More...
 
ExiterListener newExiterListener ()
 Creates a new ExiterListener that delays application exit until archetype collection has finished. More...
 
void updateAction ()
 Updates the action's enabled state. More...
 

Private Attributes

Action action
 The action associated with this editor action. More...
 
volatile Collector collector
 The Collector if an archetype collection is running, or else. More...
 
final JFrame parent
 The parent component for dialog windows. More...
 
final ProjectSettings projectSettings
 The project settings instance. More...
 
final AbstractResources< G, A, R > resources
 The AbstractResources to collect. More...
 

Static Private Attributes

static final ActionBuilder ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta")
 Action Builder to create Actions. More...
 
static final Category LOG = Logger.getLogger(CollectArchesAction.class)
 The Logger for printing log messages. More...
 

Detailed Description

An EditorAction that runs the archetype collection.

Author
Andreas Kirschbaum

Definition at line 50 of file CollectArchesAction.java.

Constructor & Destructor Documentation

◆ CollectArchesAction()

Member Function Documentation

◆ collectArches()

◆ doCollectArches()

◆ newExiterListener()

ExiterListener net.sf.gridarta.action.CollectArchesAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.newExiterListener ( )
private

Creates a new ExiterListener that delays application exit until archetype collection has finished.

Returns
the exiter listener

Definition at line 188 of file CollectArchesAction.java.

References net.sf.gridarta.action.CollectArchesAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.collector, and net.sf.gridarta.commands.Collector.waitUntilFinished().

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

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

◆ setAction()

void net.sf.gridarta.action.CollectArchesAction< 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 119 of file CollectArchesAction.java.

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

◆ updateAction()

void net.sf.gridarta.action.CollectArchesAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateAction ( )
private

Member Data Documentation

◆ action

Action net.sf.gridarta.action.CollectArchesAction< 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 94 of file CollectArchesAction.java.

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

◆ ACTION_BUILDER

final ActionBuilder net.sf.gridarta.action.CollectArchesAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta")
staticprivate

Action Builder to create Actions.

Definition at line 56 of file CollectArchesAction.java.

◆ collector

volatile Collector net.sf.gridarta.action.CollectArchesAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.collector
private

◆ LOG

final Category net.sf.gridarta.action.CollectArchesAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.LOG = Logger.getLogger(CollectArchesAction.class)
staticprivate

The Logger for printing log messages.

Definition at line 62 of file CollectArchesAction.java.

◆ parent

final JFrame net.sf.gridarta.action.CollectArchesAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.parent
private

◆ projectSettings

◆ resources


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