|
Gridarta Editor
|
Interface for MapArchObjects. More...
Inheritance diagram for net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >:
Collaboration diagram for net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >:Public Member Functions | |
| void | addMapArchObjectListener (@NotNull MapArchObjectListener listener) |
| Registers an event listener. More... | |
| void | addText (@NotNull String text) |
| Appends 'text' to the map text. More... | |
| void | beginTransaction () |
| Starts a new transaction. More... | |
| String | calculateTilePath (@NotNull Direction direction, @Nullable MapFile mapFile) |
| Calculate a single tile path in a particular direction. More... | |
| void | calculateTilePaths (@Nullable MapFile mapFile, @NotNull File mapsDirectory) |
| Calculates tiled paths for the map automatically. More... | |
| A | createClone () |
| Creates a copy of this object. More... | |
| void | endTransaction () |
| Ends a transaction. More... | |
| void | endTransaction (boolean fireEvent) |
| Ends a transaction. More... | |
| int | getDarkness () |
| Returns the light / darkness of this map. More... | |
| int | getDifficulty () |
| Returns the map's difficulty. More... | |
| Point | getEnter () |
| Returns the enter coordinates. More... | |
| int | getEnterX () |
| Returns the enter x coordinate. More... | |
| int | getEnterY () |
| Returns the enter y coordinate. More... | |
| String | getMapName () |
| Returns the map name. More... | |
| Size2D | getMapSize () |
| Returns the map size. More... | |
| int | getResetTimeout () |
| Returns the reset timeout (in seconds). More... | |
| int | getSwapTime () |
| Returns the swap time (in ticks). More... | |
| String | getText () |
| Returns the message text. More... | |
| String | getTilePath (@NotNull Direction direction) |
| Returns a tile path. More... | |
| int | getTilePaths () |
| Returns the number of tile paths. More... | |
| boolean | isFixedReset () |
| Returns whether this map uses a fixed reset. More... | |
| boolean | isOutdoor () |
| Returns whether the map is an "outdoor" map. More... | |
| boolean | isPointValid (@Nullable Point pos) |
| Checks whether the given coordinate is within map bounds. More... | |
| boolean | isTilePathAuto (@NotNull Direction direction, @Nullable MapFile mapFile) |
| Determines whether a tiled map in the specified direction is automatic tiled path or not. More... | |
| void | removeMapArchObjectListener (@NotNull MapArchObjectListener listener) |
| Unregisters an event listener. More... | |
| void | setDarkness (int darkness) |
| Sets the light / darkness of this map. More... | |
| void | setDifficulty (int difficulty) |
| Sets the map's difficulty. More... | |
| void | setEnterX (int enterX) |
| Sets the enter x coordinate. More... | |
| void | setEnterY (int enterY) |
| Sets the enter y coordinate. More... | |
| void | setFixedReset (boolean fixedReset) |
| Sets whether this map uses a fixed reset. More... | |
| void | setMapName (@NotNull String name) |
| Sets the map name. More... | |
| void | setMapSize (@NotNull Size2D mapSize) |
| Sets the map size. More... | |
| void | setOutdoor (boolean outdoor) |
| Sets whether the map is an "outdoor" map. More... | |
| void | setResetTimeout (int resetTimeout) |
| Sets the reset timeout (in seconds). More... | |
| void | setState (@NotNull A mapArchObject) |
| Resets the state of this object to the state of the given map arch object. More... | |
| void | setSwapTime (int swapTime) |
| Sets the swap time (in ticks). More... | |
| void | setText (String text) |
| Sets the map text. More... | |
| void | setTilePath (@NotNull Direction direction, @NotNull String tilePath) |
| Sets a tile path. More... | |
| void | updateModifiedAttribute (@NotNull String userName) |
| Updates the "Modified:" attribute in the message text. More... | |
Interface for MapArchObjects.
Enter coordinates (getEnterX(), setEnterX(int), getEnterY(), setEnterY(int)) determines where a player enters this map from another map when using an exit.
Definition at line 40 of file MapArchObject.java.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.addMapArchObjectListener | ( | @NotNull MapArchObjectListener | listener | ) |
Registers an event listener.
| listener | the listener to register |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.addText | ( | @NotNull String | text | ) |
Appends 'text' to the map text.
| text | the string to add |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.beginTransaction | ( | ) |
Starts a new transaction.
Transactions may be nested. Transactions serve the purpose of firing events to the views when more changes are known to come before the view is really required to update. Each invocation of this function requires its own invocation of endTransaction().
Beginning a nested transaction is a cheap operation.
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
Referenced by net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.updateTilePaths().
Here is the caller graph for this function:| String net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.calculateTilePath | ( | @NotNull Direction | direction, |
| @Nullable MapFile | mapFile | ||
| ) |
Calculate a single tile path in a particular direction.
| direction | the direction |
| mapFile | map file |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.calculateTilePaths | ( | @Nullable MapFile | mapFile, |
| @NotNull File | mapsDirectory | ||
| ) |
Calculates tiled paths for the map automatically.
| mapFile | map file |
| mapsDirectory | maps directory |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| A net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.createClone | ( | ) |
Creates a copy of this object.
Implemented in net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject, net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject, and net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.endTransaction | ( | ) |
Ends a transaction.
Invoking this method will reduce the transaction depth by only 1.
Ending a nested operation is a cheap operation. Ending a transaction without changes also is a cheap operation.
If the last transaction is ended, the changes are committed.
Same as endTransaction(false).
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
Referenced by net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.updateTilePaths().
Here is the caller graph for this function:| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.endTransaction | ( | boolean | fireEvent | ) |
Ends a transaction.
Invoking this method will reduce the transaction depth by only 1.
Ending a nested operation is a cheap operation. Ending a transaction without changes also is a cheap operation.
If the last transaction is ended, the changes are committed.
An example where setting
to
is useful even though the outermost transaction is not ended is when during painting the UI should be updated though painting is not finished.
| fireEvent |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| int net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getDarkness | ( | ) |
Returns the light / darkness of this map.
(0 means fully bright)
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| int net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getDifficulty | ( | ) |
Returns the map's difficulty.
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
Here is the caller graph for this function:| Point net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getEnter | ( | ) |
Returns the enter coordinates.
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| int net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getEnterX | ( | ) |
Returns the enter x coordinate.
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| int net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getEnterY | ( | ) |
Returns the enter y coordinate.
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| String net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getMapName | ( | ) |
Returns the map name.
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| Size2D net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getMapSize | ( | ) |
Returns the map size.
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
Referenced by net.sf.gridarta.model.floodfill.FloodFill< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.floodFill(), and net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.validateMapSizes().
Here is the caller graph for this function:| int net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getResetTimeout | ( | ) |
Returns the reset timeout (in seconds).
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| int net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getSwapTime | ( | ) |
Returns the swap time (in ticks).
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| String net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getText | ( | ) |
Returns the message text.
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| String net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getTilePath | ( | @NotNull Direction | direction | ) |
Returns a tile path.
| direction | the tile path direction |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
Referenced by net.sf.gridarta.gui.map.maptilepane.AbstractMapTilePane< net.sf.gridarta.var.daimonin.model.gameobject.GameObject, net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject, net.sf.gridarta.var.daimonin.model.archetype.Archetype >.createTilePanels(), net.sf.gridarta.gui.dialog.shrinkmapsize.ShrinkMapSizeDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateWarnings(), and net.sf.gridarta.model.validation.checks.TilePathsChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.validateMap().
Here is the caller graph for this function:| int net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.getTilePaths | ( | ) |
Returns the number of tile paths.
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| boolean net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.isFixedReset | ( | ) |
Returns whether this map uses a fixed reset.
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| boolean net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.isOutdoor | ( | ) |
Returns whether the map is an "outdoor" map.
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| boolean net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.isPointValid | ( | @Nullable Point | pos | ) |
Checks whether the given coordinate is within map bounds.
| pos | the coordinates to check |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
Referenced by net.sf.gridarta.mainactions.MainActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doExpandEmptySelection(), net.sf.gridarta.action.GrowSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doGrowSelection(), net.sf.gridarta.gui.panel.tools.InsertionTool< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doInsert(), net.sf.gridarta.action.ShrinkSelectionAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doShrinkSelection(), net.sf.gridarta.model.floodfill.FloodFill< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.floodFill(), and net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.paste().
Here is the caller graph for this function:| boolean net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.isTilePathAuto | ( | @NotNull Direction | direction, |
| @Nullable MapFile | mapFile | ||
| ) |
Determines whether a tiled map in the specified direction is automatic tiled path or not.
| direction | direction of the tiled map |
| mapFile | map file |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.removeMapArchObjectListener | ( | @NotNull MapArchObjectListener | listener | ) |
Unregisters an event listener.
| listener | the listener to unregister |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setDarkness | ( | int | darkness | ) |
Sets the light / darkness of this map.
| darkness | the new light / darkness of this map |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setDifficulty | ( | int | difficulty | ) |
Sets the map's difficulty.
| difficulty | the new difficulty for this map |
Implemented in net.sf.gridarta.var.crossfire.model.maparchobject.MapArchObject, net.sf.gridarta.var.atrinik.model.maparchobject.MapArchObject, net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject, and net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setEnterX | ( | int | enterX | ) |
Sets the enter x coordinate.
| enterX | the new enter x coordinate |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setEnterY | ( | int | enterY | ) |
Sets the enter y coordinate.
| enterY | the new enter y coordinate |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setFixedReset | ( | boolean | fixedReset | ) |
Sets whether this map uses a fixed reset.
| fixedReset | whether this map should use a fixed reset |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setMapName | ( | @NotNull String | name | ) |
Sets the map name.
| name | the new map name |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setMapSize | ( | @NotNull Size2D | mapSize | ) |
Sets the map size.
| mapSize | the new map size this does not change the size of the underlying MapModel. We eventually should change that so a map size isn't stored twice. |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setOutdoor | ( | boolean | outdoor | ) |
Sets whether the map is an "outdoor" map.
| outdoor | whether the map is an "outdoor" map |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setResetTimeout | ( | int | resetTimeout | ) |
Sets the reset timeout (in seconds).
| resetTimeout | the new reset timeout (in seconds) |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setState | ( | @NotNull A | mapArchObject | ) |
Resets the state of this object to the state of the given map arch object.
| mapArchObject | the map arch object to copy the state from |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setSwapTime | ( | int | swapTime | ) |
Sets the swap time (in ticks).
| swapTime | the swap time (in ticks) |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setText | ( | String | text | ) |
Sets the map text.
| text | the new map text |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.setTilePath | ( | @NotNull Direction | direction, |
| @NotNull String | tilePath | ||
| ) |
Sets a tile path.
| direction | the tile path direction |
| tilePath | the new tile path |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.
Referenced by net.sf.gridarta.gui.map.maptilepane.AbstractMapTilePane< net.sf.gridarta.var.daimonin.model.gameobject.GameObject, net.sf.gridarta.var.daimonin.model.maparchobject.MapArchObject, net.sf.gridarta.var.daimonin.model.archetype.Archetype >.modifyMapProperties(), and net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.updateTilePaths().
Here is the caller graph for this function:| void net.sf.gridarta.model.maparchobject.MapArchObject< A extends MapArchObject< A >.updateModifiedAttribute | ( | @NotNull String | userName | ) |
Updates the "Modified:" attribute in the message text.
| userName | the user name to include |
Implemented in net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.