public abstract class AbstractServerActions<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.Object implements EditorAction, MapViewManagerListener<G,A,R>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractServerActions(FileControl<G,A,R> fileControl)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activeMapViewChanged(MapView<G,A,R> mapView)
This event handler is called when the current map view has changed.
|
void |
mapViewClosing(MapView<G,A,R> mapView)
This event handler is called when a map view is to be closed.
|
void |
mapViewCreated(MapView<G,A,R> mapView)
This event handler is called when a map view was created.
|
void |
openInClient()
Action method for "open in client".
|
protected abstract void |
resetMap(java.lang.String mapPath)
Resets a map identified by the given map path.
|
void |
setAction(javax.swing.Action action,
java.lang.String name)
Sets the
Action instance for this editor action. |
protected abstract void |
teleportCharacterToMap(java.lang.String mapPath,
int mapX,
int mapY)
Teleports the character to the given map path.
|
protected AbstractServerActions(@NotNull
FileControl<G,A,R> fileControl)
fileControl - the file control for saving maps@ActionMethod public void openInClient()
protected abstract void resetMap(@NotNull
java.lang.String mapPath)
throws java.io.IOException
mapPath - the map path to reset.java.io.IOException - if reset failsprotected abstract void teleportCharacterToMap(@NotNull
java.lang.String mapPath,
int mapX,
int mapY)
throws java.io.IOException
mapPath - the map path to teleport tomapX - the x coordinate to teleport tomapY - the y coordinate to teleport tojava.io.IOException - if teleportation failspublic void setAction(@NotNull
javax.swing.Action action,
@NotNull
java.lang.String name)
Action instance for this editor action.setAction in interface EditorActionaction - the action instancename - the name of the actionpublic void activeMapViewChanged(@Nullable
MapView<G,A,R> mapView)
activeMapViewChanged in interface MapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>mapView - the new map view or null if no opened map view
existspublic void mapViewCreated(@NotNull
MapView<G,A,R> mapView)
mapViewCreated in interface MapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>mapView - the created map viewpublic void mapViewClosing(@NotNull
MapView<G,A,R> mapView)
mapViewClosing in interface MapViewManagerListener<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>mapView - the map view that is to be closed