 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.actions;
22 import java.awt.Point;
23 import java.io.IOException;
24 import javax.swing.Action;
35 import net.
sf.japi.swing.action.ActionMethod;
36 import org.jetbrains.annotations.NotNull;
37 import org.jetbrains.annotations.Nullable;
96 if (mapView ==
null) {
103 if (mapFile ==
null) {
113 final int mapX = cursor.x;
114 final int mapY = cursor.y;
119 }
catch (
final IOException ex) {
132 protected abstract void resetMap(@NotNull String mapPath)
throws IOException;
141 protected abstract void teleportCharacterToMap(@NotNull String mapPath,
int mapX,
int mapY)
throws IOException;
144 public void setAction(@NotNull
final Action action, @NotNull
final String
name) {
A MapModel reflects the data of a map.
void openInClient()
Action method for "open in client".
abstract void teleportCharacterToMap(@NotNull String mapPath, int mapX, int mapY)
Teleports the character to the given map path.
Actions that require a connection to a game server.
MapControl< G, A, R > getMapControl()
Return the controller of this view.
Base package of all Gridarta classes.
void mapViewClosing(@NotNull final MapView< G, A, R > mapView)
@noinspection NoopMethodInAbstractClass
Interface for listeners interested in events related to {} instances.
void updateActions()
Update the enabled/disabled state of all actions.
Reflects a game object (object on a map).
boolean isModified()
Return whether the map has been modified from the on-disk state.
AbsoluteMapPath getMapPath()
Returns the map path within getMapsDir().
Graphical User Interface of Gridarta.
void mapViewCreated(@NotNull final MapView< G, A, R > mapView)
@noinspection NoopMethodInAbstractClass
MapCursor< G, A, R > getMapCursor()
Returns the MapCursor of this view.
GameObjects are the objects based on Archetypes found on maps.
void setAction(@NotNull final Action action, @NotNull final String name)
Sets the Action instance for this editor action.
void activeMapViewChanged(@Nullable final MapView< G, A, R > mapView)
This event handler is called when the current map view has changed.
Interface for MapArchObjects.
boolean doOpenInClient(final boolean performAction)
Executes the "open in client" action.
Action aOpenInClient
The action for "open in client".
Point getLocation()
Get position of cursor.
A map view consists of a map grid and a map cursor, and is attached to a map control.
void reportTeleportCharacterError(@NotNull String mapPath, @NotNull String message)
Reports an error while teleporting a character to the current map.
AbstractServerActions(@NotNull final FileControl< G, A, R > fileControl)
Creates a new instance.
The location of a map file with a map directory.
abstract void resetMap(@NotNull String mapPath)
Resets a map identified by the given map path.
Base classes for rendering maps.
Currently nothing more than a marker interface for unification.
MapView< G, A, R > currentMapView
The currently active map or.
MapModel< G, A, R > getMapModel()
Returns the map model.
boolean save(@NotNull MapControl< G, A, R > mapControl)
Save one map.
MapFile getMapFile()
Returns the map file.
final FileControl< G, A, R > fileControl
The file control for saving maps.