Gridarta Editor
net.sf.gridarta.actions.AbstractServerActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R > Class Template Referenceabstract
+ Inheritance diagram for net.sf.gridarta.actions.AbstractServerActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
+ Collaboration diagram for net.sf.gridarta.actions.AbstractServerActions< 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)
 
void mapViewClosing (@NotNull final MapView< G, A, R > mapView)
 
void mapViewCreated (@NotNull final MapView< G, A, R > mapView)
 
void openInClient ()
 
void setAction (@NotNull final Action action, @NotNull final String name)
 

Protected Member Functions

 AbstractServerActions (@NotNull final FileControl< G, A, R > fileControl)
 
abstract void resetMap (@NotNull String mapPath) throws IOException
 
abstract void teleportCharacterToMap (@NotNull String mapPath, int mapX, int mapY) throws IOException
 

Private Member Functions

boolean doOpenInClient (final boolean performAction)
 
void updateActions ()
 

Private Attributes

Action aOpenInClient
 
MapView< G, A, R > currentMapView
 
final FileControl< G, A, R > fileControl
 

Detailed Description

Actions that require a connection to a game server.

Author
Andreas Kirschbaum @noinspection AbstractClassWithOnlyOneDirectInheritor

Definition at line 44 of file AbstractServerActions.java.

Constructor & Destructor Documentation

◆ AbstractServerActions()

net.sf.gridarta.actions.AbstractServerActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.AbstractServerActions ( @NotNull final FileControl< G, A, R >  fileControl)
protected

Creates a new instance.

Parameters
fileControlthe file control for saving maps

Definition at line 68 of file AbstractServerActions.java.

Member Function Documentation

◆ activeMapViewChanged()

void net.sf.gridarta.actions.AbstractServerActions< 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.

Parameters
mapViewthe new map view or
null
if no opened map view exists

Implements net.sf.gridarta.gui.map.mapview.MapViewManagerListener< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.

Definition at line 150 of file AbstractServerActions.java.

◆ doOpenInClient()

boolean net.sf.gridarta.actions.AbstractServerActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doOpenInClient ( final boolean  performAction)
private

Executes the "open in client" action.

Parameters
performActionwhether the action should be performed
Returns
whether the action was or can be performed

Definition at line 94 of file AbstractServerActions.java.

Referenced by net.sf.gridarta.actions.AbstractServerActions< GameObject, MapArchObject, Archetype >.openInClient(), and net.sf.gridarta.actions.AbstractServerActions< GameObject, MapArchObject, Archetype >.updateActions().

+ Here is the caller graph for this function:

◆ mapViewClosing()

void net.sf.gridarta.actions.AbstractServerActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapViewClosing ( @NotNull final MapView< G, A, R >  mapView)

◆ mapViewCreated()

void net.sf.gridarta.actions.AbstractServerActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapViewCreated ( @NotNull final MapView< G, A, R >  mapView)

◆ openInClient()

void net.sf.gridarta.actions.AbstractServerActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.openInClient ( )

Action method for "open in client".

Definition at line 76 of file AbstractServerActions.java.

◆ resetMap()

abstract void net.sf.gridarta.actions.AbstractServerActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.resetMap ( @NotNull String  mapPath) throws IOException
abstractprotected

Resets a map identified by the given map path.

Parameters
mapPaththe map path to reset
Exceptions
IOExceptionif reset fails

Reimplemented in net.sf.gridarta.var.atrinik.actions.AtrinikServerActions.

Referenced by net.sf.gridarta.actions.AbstractServerActions< GameObject, MapArchObject, Archetype >.doOpenInClient().

+ Here is the caller graph for this function:

◆ setAction()

void net.sf.gridarta.actions.AbstractServerActions< 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 144 of file AbstractServerActions.java.

◆ teleportCharacterToMap()

abstract void net.sf.gridarta.actions.AbstractServerActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.teleportCharacterToMap ( @NotNull String  mapPath,
int  mapX,
int  mapY 
) throws IOException
abstractprotected

Teleports the character to the given map path.

Parameters
mapPaththe map path to teleport to
mapXthe x coordinate to teleport to
mapYthe y coordinate to teleport to
Exceptions
IOExceptionif teleportation fails

Reimplemented in net.sf.gridarta.var.atrinik.actions.AtrinikServerActions.

Referenced by net.sf.gridarta.actions.AbstractServerActions< GameObject, MapArchObject, Archetype >.doOpenInClient().

+ Here is the caller graph for this function:

◆ updateActions()

void net.sf.gridarta.actions.AbstractServerActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateActions ( )
private

Member Data Documentation

◆ aOpenInClient

◆ currentMapView

◆ fileControl


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