Gridarta Editor
net.sf.gridarta.actions.ExitConnectorActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R > Class Template Reference
+ Inheritance diagram for net.sf.gridarta.actions.ExitConnectorActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
+ Collaboration diagram for net.sf.gridarta.actions.ExitConnectorActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:

Public Member Functions

boolean doExitConnect (final boolean performAction, @NotNull final MapControl< G, A, R > mapControl, @NotNull final Point targetLocation)
 
boolean doExitCopy (final boolean performAction, @NotNull final MapControl< G, A, R > mapControl, @NotNull final Point location)
 
boolean doExitPaste (final boolean performAction, @NotNull final MapControl< G, A, R > mapControl, @NotNull final Point targetLocation)
 
 ExitConnectorActions (@NotNull final ExitConnectorModel exitConnectorModel, @NotNull final ExitMatcher< G, A, R > exitMatcher, @NotNull final ArchetypeSet< G, A, R > archetypeSet, @NotNull final MapManager< G, A, R > mapManager, @NotNull final FileControl< G, A, R > fileControl, @NotNull final InsertionModeSet< G, A, R > insertionModeSet)
 

Private Member Functions

boolean doExitConnect (final boolean performAction, @Nullable final BaseObject<?, ?, ?, ?> targetExit, @Nullable final BaseObject< G, A, R, ?> targetArchetype, @NotNull final MapModel< G, A, R > targetMapModel, @NotNull final Point targetLocation, @NotNull final MapFile targetMapFile, @NotNull final MapModel< G, A, R > sourceMapModel, @NotNull final ExitLocation sourceExitLocation)
 
void pasteExit (@NotNull final BaseObject<?, ?, ?, ?> gameObject, @NotNull final MapModel< G, A, R > mapModel, @NotNull final ExitLocation exitLocation, @Nullable final MapFile gameObjectMapFile)
 
boolean pasteExit (@NotNull final Point location, @NotNull final MapModel< G, A, R > mapModel, @NotNull final BaseObject< G, A, R, ?> archetype, @NotNull final ExitLocation exitLocation, @Nullable final MapFile mapFile)
 

Private Attributes

final ArchetypeSet< G, A, R > archetypeSet
 
final ExitConnectorModel exitConnectorModel
 
final ExitMatcher< G, A, R > exitMatcher
 
final FileControl< G, A, R > fileControl
 
final InsertionModeSet< G, A, R > insertionModeSet
 
final MapManager< G, A, R > mapManager
 

Detailed Description

Utility class implementing actions that operate on ExitConnectorModels.

Author
Andreas Kirschbaum

Definition at line 47 of file ExitConnectorActions.java.

Constructor & Destructor Documentation

◆ ExitConnectorActions()

net.sf.gridarta.actions.ExitConnectorActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.ExitConnectorActions ( @NotNull final ExitConnectorModel  exitConnectorModel,
@NotNull final ExitMatcher< G, A, R >  exitMatcher,
@NotNull final ArchetypeSet< G, A, R >  archetypeSet,
@NotNull final MapManager< G, A, R >  mapManager,
@NotNull final FileControl< G, A, R >  fileControl,
@NotNull final InsertionModeSet< G, A, R >  insertionModeSet 
)

Creates a new instance.

Parameters
exitConnectorModelthe exit connector model to use
exitMatcherthe exit matcher to use
archetypeSetthe archetype set to use
mapManagerthe map manager for loading maps
fileControlthe file control to use
insertionModeSetthe insertion mode set to use

Definition at line 94 of file ExitConnectorActions.java.

Member Function Documentation

◆ doExitConnect() [1/2]

boolean net.sf.gridarta.actions.ExitConnectorActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doExitConnect ( final boolean  performAction,
@NotNull final MapControl< G, A, R >  mapControl,
@NotNull final Point  targetLocation 
)

Executes the "exit connect" action.

Parameters
performActionwhether the action should be performed
mapControlthe map control to connect with
targetLocationthe target location to connect
Returns
whether the action was or can be performed

Definition at line 189 of file ExitConnectorActions.java.

Referenced by net.sf.gridarta.gui.exitconnector.ExitConnectorController< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doExitConnect(), net.sf.gridarta.actions.ExitConnectorActions< G, A, R >.doExitConnect(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitConnect1(), and net.sf.gridarta.actions.ExitConnectorActionsTest.testExitConnectAuto1().

+ Here is the caller graph for this function:

◆ doExitConnect() [2/2]

boolean net.sf.gridarta.actions.ExitConnectorActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doExitConnect ( final boolean  performAction,
@Nullable final BaseObject<?, ?, ?, ?>  targetExit,
@Nullable final BaseObject< G, A, R, ?>  targetArchetype,
@NotNull final MapModel< G, A, R >  targetMapModel,
@NotNull final Point  targetLocation,
@NotNull final MapFile  targetMapFile,
@NotNull final MapModel< G, A, R >  sourceMapModel,
@NotNull final ExitLocation  sourceExitLocation 
)
private

Executes part of the "exit connect" action.

Parameters
performActionwhether the action should be performed
targetExitthe target exit game object or
null
targetArchetypethe target exit archetype;
null
if
targetExit
is non-
null
; unused otherwise
targetMapModelthe target's map model
targetLocationthe target's coordinates
targetMapFilethe target's file
sourceMapModelthe source's map model
sourceExitLocationthe source's exit location
Returns
whether the action was or can be performed
whether the action was or can be performed

Definition at line 263 of file ExitConnectorActions.java.

◆ doExitCopy()

boolean net.sf.gridarta.actions.ExitConnectorActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doExitCopy ( final boolean  performAction,
@NotNull final MapControl< G, A, R >  mapControl,
@NotNull final Point  location 
)

Executes the "exit copy" action.

Parameters
performActionwhether the action should be performed
mapControlthe map control to copy from
locationthe cursor location
Returns
whether the action was or can be performed

Definition at line 110 of file ExitConnectorActions.java.

Referenced by net.sf.gridarta.gui.exitconnector.ExitConnectorController< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doExitCopy(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitCopy1(), and net.sf.gridarta.actions.ExitConnectorActionsTest.testExitPaste2().

+ Here is the caller graph for this function:

◆ doExitPaste()

boolean net.sf.gridarta.actions.ExitConnectorActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doExitPaste ( final boolean  performAction,
@NotNull final MapControl< G, A, R >  mapControl,
@NotNull final Point  targetLocation 
)

Executes the "exit paste" action.

Parameters
performActionwhether the action should be performed
mapControlthe map control to paste into
targetLocationthe target location to paste to
Returns
whether the action was or can be performed

Definition at line 133 of file ExitConnectorActions.java.

Referenced by net.sf.gridarta.gui.exitconnector.ExitConnectorController< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doExitPaste(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitPaste1(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitPaste2(), and net.sf.gridarta.actions.ExitConnectorActionsTest.testPath().

+ Here is the caller graph for this function:

◆ pasteExit() [1/2]

void net.sf.gridarta.actions.ExitConnectorActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.pasteExit ( @NotNull final BaseObject<?, ?, ?, ?>  gameObject,
@NotNull final MapModel< G, A, R >  mapModel,
@NotNull final ExitLocation  exitLocation,
@Nullable final MapFile  gameObjectMapFile 
)
private

Pastes exit information into an exit game object.

Parameters
gameObjectthe exit game object to paste into
mapModelthe map model to paste into
exitLocationthe exit information to paste
gameObjectMapFilethe map file of
gameObject
or
null
if on an unsaved map

Definition at line 320 of file ExitConnectorActions.java.

Referenced by net.sf.gridarta.actions.ExitConnectorActions< G, A, R >.doExitConnect(), and net.sf.gridarta.actions.ExitConnectorActions< G, A, R >.doExitPaste().

+ Here is the caller graph for this function:

◆ pasteExit() [2/2]

boolean net.sf.gridarta.actions.ExitConnectorActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.pasteExit ( @NotNull final Point  location,
@NotNull final MapModel< G, A, R >  mapModel,
@NotNull final BaseObject< G, A, R, ?>  archetype,
@NotNull final ExitLocation  exitLocation,
@Nullable final MapFile  mapFile 
)
private

Creates a new exit game object.

Parameters
locationthe location to insert into
mapModelthe map model to insert into
archetypethe archetype to insert
exitLocationthe exit information to use
mapFilethe map file to insert into or
null
for unsaved maps
Returns
whether insertion was successful

Definition at line 339 of file ExitConnectorActions.java.

Member Data Documentation

◆ archetypeSet

◆ exitConnectorModel

◆ exitMatcher

◆ fileControl

◆ insertionModeSet

◆ mapManager


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