|
Gridarta Editor
|
A MapModel reflects the data of a map. More...
Inheritance diagram for net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
Collaboration diagram for net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:Public Member Functions | |
| void | addActiveEditType (int editType) |
| Add edit type to the bitmask of active types. More... | |
| void | addGameObjectToMap (@NotNull G gameObject, @NotNull Point pos, @NotNull InsertionMode< G, A, R > insertionMode) |
| Add a gameObject to the map. More... | |
| void | addMapModelListener (@NotNull MapModelListener< G, A, R > listener) |
| Register a map listener. More... | |
| void | addMapTransactionListener (@NotNull MapTransactionListener< G, A, R > listener) |
| Registers a map transaction listener. More... | |
| void | addObjectListToMap (@NotNull Iterable< G > objects) |
| Adds a list of GameObjects to this map. More... | |
| void | beginGameObjectChange (@NotNull G gameObject) |
| Method to notify the model that a game object is about to change. More... | |
| void | beginSquareChange (@NotNull MapSquare< G, A, R > mapSquare) |
| Method to notify the model that a map square is about to change. More... | |
| void | beginTransaction (@NotNull String name) |
| Starts a new transaction. More... | |
| void | clearMap () |
| Clears this map completely. More... | |
| void | endAllTransactions () |
| Ends all transaction. More... | |
| void | endGameObjectChange (@NotNull G gameObject) |
| Method to notify the model that a game object was changed. More... | |
| void | endSquareChange (@NotNull MapSquare< G, A, R > mapSquare) |
| Method to notify the model that a map square was changed. More... | |
| void | endTransaction () |
| End a transaction. More... | |
| void | endTransaction (boolean fireEvent) |
| End a transaction. More... | |
| void | facesReloaded () |
| Will be called whenever the archetype faces have been reloaded. More... | |
| List< G > | getAllGameObjects () |
| Returns all game objects. More... | |
| ErrorCollector< G, A, R > | getErrors () |
| Gets the errors in this map. More... | |
| A | getMapArchObject () |
| Returns the Map Arch Object with the meta information about the map. More... | |
| MapFile | getMapFile () |
| Returns the map file. More... | |
| MapFile | getMapFile (@NotNull MapPath mapPath) throws SameMapException, UnsavedMapException |
| Returns the map file for a map that can be reached by following a MapPath from this map. More... | |
| MapSquare< G, A, R > | getMapSquare (@NotNull Point pos) |
| Get the square at a specified location. More... | |
| int | getTransactionDepth () |
| Get the transaction depth, which is the number of beginTransaction(String) invocations without matching endTransaction() invocations. More... | |
| G | insertArchToMap (@NotNull BaseObject< G, A, R, ?> templateBaseObject, @Nullable G nextGameObject, @NotNull Point pos, boolean join) |
| Insert a game object to the map at a specified position. More... | |
| G | insertBaseObject (@NotNull BaseObject< G, A, R, ?> baseObject, @NotNull Point pos, boolean allowMany, boolean join, @NotNull InsertionMode< G, A, R > insertionMode) |
| Inserts a BaseObject to a map. More... | |
| boolean | isAnyTransactionActive () |
| Returns whether a transaction is currently active. More... | |
| boolean | isAreaEmpty (int left, int top, int width, int height) |
| Checks whether an area of a map is completely empty. More... | |
| boolean | isEmpty () |
| Returns whether the map is empty. More... | |
| boolean | isModified () |
| Return whether the map has been modified from the on-disk state. More... | |
| boolean | isMultiArchFittingToMap (@NotNull Archetype< G, A, R > archetype, @NotNull Point pos, boolean allowDouble) |
| Checks whether an GameObject (multi-arch) would still fit on this map. More... | |
| void | mapClosed () |
| This function must be called if this instance is freed. More... | |
| void | moveEnv (@NotNull G gameObject, @NotNull Point pos, @NotNull G nextGameObject) |
| Moves a GameObject to its environment. More... | |
| void | moveInv (@NotNull G gameObject, @NotNull GameObject< G, A, R > prevGameObject) |
| Moves a GameObject to the inventory of another game object. More... | |
| void | nextPoint (Point point, int direction) |
| Moves the given point forward or backward one map square. More... | |
| void | removeGameObject (@NotNull G gameObject, boolean join) |
| Delete an existing GameObject from the map. More... | |
| void | removeMapModelListener (@NotNull MapModelListener< G, A, R > listener) |
| Unregister a map listener. More... | |
| void | removeMapTransactionListener (@NotNull MapTransactionListener< G, A, R > listener) |
| Unregisters a map transaction listener. More... | |
| void | resetModified () |
| Resets the modified flag to false. More... | |
| void | setErrors (@NotNull ErrorCollector< G, A, R > errors) |
| Sets the errors in this map. More... | |
| void | setMapFile (@Nullable MapFile mapFile) |
| Sets the map file. More... | |
| void | transientGameObjectChange (@NotNull G gameObject) |
| Method to notify the model that a game object was changed but need not be restored by undo/redo. More... | |
A MapModel reflects the data of a map.
This MapModel interface covers the similarities between the current CFEditor and DaiEditor implementations.
The purpose of the transaction system in MapModel is to allow several subsequent changes to the model to be collected as a single big change before the registered listeners (usually the user interface) gets notified. This prevents the user interface from performing hundreds of updates when a single one would be enough. The transaction system will also be used for implementing undo / redo.
It's not purpose of the transaction system to provide concurrent transactions for concurrent threads. A MapModel will protect itself against concurrent modification.
The transaction system is efficient-safe. The following operations are very cheap:
Whether beginning the outermost transaction will be a cheap operation is not yet decided.
Transactions are recorded.
It is not (yet?) the purpose of the transaction system to provide real transactions (ACID). Queries to the MapModel during an ongoing transaction will reflect the intermediate state. And there is no rollback yet, but this is planned for future as it's required for undo anyway.
The following features are not yet implemented but planned.
The transaction system will serve as a base for an undo / redo system. Beginning the outermost transaction stores a new undo record in the undo buffer. An undo record consists of the transaction's name plus the current map state.
Definition at line 75 of file MapModel.java.
| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addActiveEditType | ( | int | editType | ) |
Add edit type to the bitmask of active types.
If this is a new type, it gets calculated for every arch on the map. Once it is calculated, we save that state in 'activeEditType' so we don't need to do it again.
| editType | new edit type |
Referenced by net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testEditType1().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addGameObjectToMap | ( | @NotNull G | gameObject, |
| @NotNull Point | pos, | ||
| @NotNull InsertionMode< G, A, R > | insertionMode | ||
| ) |
Add a gameObject to the map.
Including multi square objects. This function allows to insert any given GameObject. Make sure that the given
is a new and unlinked object.
| gameObject | The new GameObject with set destination coordinates to be linked onto the map. |
| pos | the insert location |
| insertionMode | the insertion mode to use |
Referenced by net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintAlign1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintAlign2(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintCombined1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZ1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZ2(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom2(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom3(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom4(), and net.sf.gridarta.model.mapcontrol.DefaultMapControlTest.testSaveAs1().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addMapModelListener | ( | @NotNull MapModelListener< G, A, R > | listener | ) |
Register a map listener.
| listener | the listener to register |
Referenced by net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.addMapModelListener(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserModel< G, A, R >.addMapModelListener(), net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesControl< G, A, R >.GameObjectAttributesControl(), net.sf.gridarta.gui.dialog.gameobjectattributes.GameObjectAttributesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.GameObjectAttributesDialog(), net.sf.gridarta.gui.mainwindow.GameObjectTextEditorTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.GameObjectTextEditorTab(), net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.init(), net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.MapFileActions(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.newMapModel(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserControl<?, ?, ?>.setCurrentPickmap(), net.sf.gridarta.gui.panel.selectedsquare.SelectedSquareView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setMapCursor(), and net.sf.gridarta.action.AbstractMoveSquareAction< G, A, R >.setMapModel().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addMapTransactionListener | ( | @NotNull MapTransactionListener< G, A, R > | listener | ) |
Registers a map transaction listener.
| listener | the the listener to register |
Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesControl< G, A, R >.GameObjectAttributesControl(), net.sf.gridarta.gui.mainwindow.GameObjectTextEditorTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.GameObjectTextEditorTab(), and net.sf.gridarta.gui.undo.UndoControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.UndoControl().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addObjectListToMap | ( | @NotNull Iterable< G > | objects | ) |
Adds a list of GameObjects to this map.
| objects | the game objects to add |
Referenced by net.sf.gridarta.model.mapcontrol.TestMapControlFactory.newMapControl(), net.sf.gridarta.var.crossfire.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.daimonin.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.atrinik.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.daimonin.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.var.crossfire.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), and net.sf.gridarta.var.atrinik.model.mapcontrol.DefaultMapControlFactory.newPickmapControl().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.beginGameObjectChange | ( | @NotNull G | gameObject | ) |
Method to notify the model that a game object is about to change.
| gameObject | the game object that is about to change |
Referenced by net.sf.gridarta.model.gameobject.AbstractGameObject< GameObject, MapArchObject, Archetype >.notifyBeginChange().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.beginSquareChange | ( | @NotNull MapSquare< G, A, R > | mapSquare | ) |
Method to notify the model that a map square is about to change.
| mapSquare | the map square that is about to change |
Referenced by net.sf.gridarta.model.mapmodel.MapSquare< G, A, R >.beginSquareChange(), and net.sf.gridarta.model.mapmodel.MapSquare< G, A, R >.notifyBeginChange().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.beginTransaction | ( | @NotNull String | name | ) |
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().
A transaction has a name. The name of the outermost transaction is used as a String presented to the user for undoing the operation enclosed by that transaction.
Beginning a nested transaction is a cheap operation.
| name | the name of the transaction |
Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesControl< G, A, R >.applyArchPanelChanges(), net.sf.gridarta.gui.dialog.gameobjectattributes.GameObjectAttributesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.applySettings(), net.sf.gridarta.gui.mainwindow.GameObjectTextEditorTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.autoApplyArchPanelChanges(), net.sf.gridarta.action.CleanCompletelyBlockedSquaresAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.cleanCompletelyBlockedSquares(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.copyNCut(), net.sf.gridarta.gui.panel.tools.DeletionTool< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.deleteArch(), net.sf.gridarta.model.mapcursor.MapCursor< G, A, R >.deleteSelectedGameObject(), net.sf.gridarta.gui.panel.gameobjectattributes.ArchTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.direction(), net.sf.gridarta.action.MoveSquareBottomAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.action.MoveSquareDownAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.action.MoveSquareTopAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.action.MoveSquareUpAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.action.MoveSquareInvAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.action.MoveSquareEnvAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.gui.panel.gameobjectattributes.EventsTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAddNewEvent(), net.sf.gridarta.gui.map.mapactions.MapActions< G, A, R >.doDeleteUnknownObjects(), net.sf.gridarta.gui.panel.gameobjectattributes.EventsTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doEditEvent(), 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.mainactions.MainActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doMassChange(), net.sf.gridarta.gui.dialog.replace.ReplaceDialog< G, A, R >.doReplace(), net.sf.gridarta.model.mapcursor.MapCursor< G, A, R >.insertGameObject(), net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesControl< G, A, R >.mapArchAddEnv(), net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesControl< G, A, R >.mapArchAddInv(), net.sf.gridarta.var.daimonin.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), net.sf.gridarta.var.atrinik.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), net.sf.gridarta.var.crossfire.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), net.sf.gridarta.model.mapcontrol.TestMapControlFactory.newMapControl(), net.sf.gridarta.var.atrinik.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.daimonin.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.crossfire.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.daimonin.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.var.crossfire.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.var.atrinik.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.paste(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.pasteTiled(), net.sf.gridarta.gui.misc.ShiftProcessor< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.shift(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testAddGameObjectToMap1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testAddGameObjectToMap2(), net.sf.gridarta.gui.copybuffer.CopyBufferTest.testCutPaste1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti3(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti4(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle2(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle3(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvIntoHead1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvMulti1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvSingle1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopMulti(), net.sf.gridarta.model.gameobject.GameObjectFactoryTest.testDoMoveSquareTopSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpSingle(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testEditType1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testEmpty(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitConnect1(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitPaste1(), net.sf.gridarta.model.floodfill.FillUtilsTest.testFillAdjacent(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testGetAllGameObjects1(), net.sf.gridarta.actions.UndoActionsTest.testInsert1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsert1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertAlt1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertAlt2(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertAlt3(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertDuplicate1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertReplace1(), net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.testInsertSystemObject1(), net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.testInsertSystemObject2(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testModifiedGameObject1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testModifiedGameObject2(), net.sf.gridarta.action.SelectedSquareActionsTest.testMoveTailPart(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintAlign1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintAlign2(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintCombined1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintNormal(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZ1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZ2(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom2(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom3(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom4(), net.sf.gridarta.actions.ExitConnectorActionsTest.testPath(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemove1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt2(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt3(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap2(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap3(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap4(), net.sf.gridarta.model.mapmanager.DefaultMapManagerTest.testRevertResizedMap(), net.sf.gridarta.model.mapcontrol.DefaultMapControlTest.testSaveAs1(), net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testSetObjectTextAttributeOrdering(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testUpdateDirectionOnInsert(), net.sf.gridarta.model.gameobject.GameObjectFactoryTest.testUpdateFaceInformation(), net.sf.gridarta.mainactions.MainActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.tileStretching(), and net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.updateTilePaths().
| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.clearMap | ( | ) |
Clears this map completely.
After invoking this method, no objects will remain on this map.
| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.endAllTransactions | ( | ) |
Ends all transaction.
Invoking this method will reduce set the transaction depth to 0. You shouldn't invoke this method regularly. It is meant as a fallback in high level methods / exception handlers to prevent errors from causing unclosed transactions.
| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.endGameObjectChange | ( | @NotNull G | gameObject | ) |
Method to notify the model that a game object was changed.
A change to a game object is atomic if getTransactionDepth() returns 0, otherwise it is transactional. The model then notifies the registered listeners of the changes.
| gameObject | the game object that has changed |
Referenced by net.sf.gridarta.model.gameobject.AbstractGameObject< GameObject, MapArchObject, Archetype >.notifyEndChange().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.endSquareChange | ( | @NotNull MapSquare< G, A, R > | mapSquare | ) |
Method to notify the model that a map square was changed.
A change to a square is atomic if getTransactionDepth() returns 0, otherwise it is transactional. The model then notifies the registered listeners of the changes.
| mapSquare | the map square that has changed |
Referenced by net.sf.gridarta.model.mapmodel.MapSquare< G, A, R >.endSquareChange(), and net.sf.gridarta.model.mapmodel.MapSquare< G, A, R >.notifyEndChange().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.endTransaction | ( | ) |
End 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).
Referenced by net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesControl< G, A, R >.applyArchPanelChanges(), net.sf.gridarta.gui.dialog.gameobjectattributes.GameObjectAttributesDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.applySettings(), net.sf.gridarta.gui.mainwindow.GameObjectTextEditorTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.autoApplyArchPanelChanges(), net.sf.gridarta.action.CleanCompletelyBlockedSquaresAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.cleanCompletelyBlockedSquares(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.copyNCut(), net.sf.gridarta.gui.panel.tools.DeletionTool< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.deleteArch(), net.sf.gridarta.model.mapcursor.MapCursor< G, A, R >.deleteSelectedGameObject(), net.sf.gridarta.gui.panel.gameobjectattributes.ArchTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.direction(), net.sf.gridarta.action.MoveSquareBottomAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.action.MoveSquareDownAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.action.MoveSquareTopAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.action.MoveSquareUpAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.action.MoveSquareInvAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.action.MoveSquareEnvAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAction(), net.sf.gridarta.gui.panel.gameobjectattributes.EventsTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAddNewEvent(), net.sf.gridarta.gui.panel.gameobjectattributes.EventsTab< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doEditEvent(), 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.mainactions.MainActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doMassChange(), net.sf.gridarta.gui.dialog.replace.ReplaceDialog< G, A, R >.doReplace(), net.sf.gridarta.model.mapcursor.MapCursor< G, A, R >.insertGameObject(), net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesControl< G, A, R >.mapArchAddEnv(), net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesControl< G, A, R >.mapArchAddInv(), net.sf.gridarta.var.daimonin.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), net.sf.gridarta.var.atrinik.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), net.sf.gridarta.var.crossfire.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), net.sf.gridarta.model.mapcontrol.TestMapControlFactory.newMapControl(), net.sf.gridarta.var.atrinik.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.daimonin.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.crossfire.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.daimonin.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.var.crossfire.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.var.atrinik.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.paste(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.pasteTiled(), net.sf.gridarta.gui.misc.ShiftProcessor< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.shift(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testAddGameObjectToMap1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testAddGameObjectToMap2(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testEditType1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testEmpty(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitConnect1(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitPaste1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testGetAllGameObjects1(), net.sf.gridarta.actions.UndoActionsTest.testInsert1(), net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.testInsertSystemObject1(), net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.testInsertSystemObject2(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testModifiedGameObject1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testModifiedGameObject2(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintAlign1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintAlign2(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintCombined1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintNormal(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZ1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZ2(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom1(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom2(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom3(), net.sf.gridarta.var.atrinik.gui.map.renderer.MapRendererTest.testPaintZoom4(), net.sf.gridarta.actions.ExitConnectorActionsTest.testPath(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap2(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap3(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap4(), net.sf.gridarta.model.mapmanager.DefaultMapManagerTest.testRevertResizedMap(), net.sf.gridarta.model.mapcontrol.DefaultMapControlTest.testSaveAs1(), net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testSetObjectTextAttributeOrdering(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testUpdateDirectionOnInsert(), net.sf.gridarta.mainactions.MainActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.tileStretching(), and net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.updateTilePaths().
| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.endTransaction | ( | boolean | fireEvent | ) |
End 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 |
| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.facesReloaded | ( | ) |
Will be called whenever the archetype faces have been reloaded.
| List<G> net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getAllGameObjects | ( | ) |
Returns all game objects.
Only top-level head parts are returned; tail parts are ignored as are objects in inventories.
Referenced by net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.getAllGameObjects(), net.sf.gridarta.gui.map.mapview.AbstractMapView< TestGameObject, TestMapArchObject, TestArchetype >.getSelectedGameObjects(), and net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testGetAllGameObjects1().
Here is the caller graph for this function:| ErrorCollector<G, A, R> net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getErrors | ( | ) |
Gets the errors in this map.
Here is the caller graph for this function:| A net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapArchObject | ( | ) |
Returns the Map Arch Object with the meta information about the map.
Referenced by net.sf.gridarta.gui.map.mapactions.MapActions< G, A, R >.activeMapViewChanged(), net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.calculateOrigin(), net.sf.gridarta.gui.map.mapview.DefaultMapView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.closeNotify(), net.sf.gridarta.model.mapcursor.MapCursorTest.createCursor(), net.sf.gridarta.var.daimonin.gui.mappropertiesdialog.MapPropertiesDialog.createMapPanel(), net.sf.gridarta.var.atrinik.gui.mappropertiesdialog.MapPropertiesDialog.createMapPanel(), net.sf.gridarta.var.crossfire.gui.mappropertiesdialog.MapPropertiesDialog.createMapPanel(), net.sf.gridarta.model.mapcontrol.TestMapControlCreator.createMaps(), net.sf.gridarta.gui.dialog.golocation.GoLocationDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.createPanel(), net.sf.gridarta.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAddBookmark(), net.sf.gridarta.gui.map.mapactions.MapActions< G, A, R >.doCreateTile(), net.sf.gridarta.gui.map.mapactions.MapActions< G, A, R >.doEnterMap(), net.sf.gridarta.actions.ExitConnectorActions< G, A, R >.doExitCopy(), 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.gui.dialog.replace.ReplaceDialog< G, A, R >.doReplace(), 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.gui.map.mapactions.EnterMap< G, A, R >.enterMap(), net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.fillAdjacentMaps(), net.sf.gridarta.var.crossfire.gui.map.renderer.SimpleFlatMapRenderer.getFullImage(), net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.getFullImage(), net.sf.gridarta.gui.dialog.plugin.parameter.map.MapParameterCellRenderer.getListCellRendererComponent(), net.sf.gridarta.gui.dialog.golocation.GoLocationDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.goLocation(), net.sf.gridarta.model.index.MapsIndexer< G, A, R >.indexPendingMaps(), 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 >.mapTilesAttach(), net.sf.gridarta.var.daimonin.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), net.sf.gridarta.var.atrinik.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), net.sf.gridarta.var.crossfire.gui.mappropertiesdialog.MapPropertiesDialog.modifyMapProperties(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.newMapModel(), net.sf.gridarta.gui.map.mapview.TestMapViewFactory.newMapView(), net.sf.gridarta.gui.map.test.TestMapControlCreatorUtils.newMapView(), net.sf.gridarta.gui.map.mapview.DefaultMapViewFactory< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.newMapView(), net.sf.gridarta.var.crossfire.gui.map.renderer.SimpleFlatMapRenderer.paintComponent(), net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.paintComponent2(), net.sf.gridarta.var.crossfire.gui.map.renderer.SmoothingRenderer.paintSmooth(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.paste(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.pasteTiled(), net.sf.gridarta.gui.misc.RecentManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.RecentManager(), net.sf.gridarta.var.daimonin.gui.mappropertiesdialog.MapPropertiesDialog.restoreMapProperties(), net.sf.gridarta.var.atrinik.gui.mappropertiesdialog.MapPropertiesDialog.restoreMapProperties(), net.sf.gridarta.var.crossfire.gui.mappropertiesdialog.MapPropertiesDialog.restoreMapProperties(), net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.revert(), net.sf.gridarta.model.mapcontrol.DefaultMapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.save(), net.sf.gridarta.gui.map.mapview.AbstractMapView< TestGameObject, TestMapArchObject, TestArchetype >.setCursorLocation(), net.sf.gridarta.var.daimonin.gui.mappropertiesdialog.MapPropertiesDialog.showDialog(), net.sf.gridarta.var.atrinik.gui.mappropertiesdialog.MapPropertiesDialog.showDialog(), net.sf.gridarta.var.crossfire.gui.mappropertiesdialog.MapPropertiesDialog.showDialog(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testAddGameObjectToMap1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testAddGameObjectToMap2(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testGetAllGameObjects1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testModifiedGameObject1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testModifiedGameObject2(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap2(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap3(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap4(), net.sf.gridarta.model.mapmanager.DefaultMapManagerTest.testRevertResizedMap(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testUpdateDirectionOnInsert(), net.sf.gridarta.model.mapmodel.MapSquare< G, A, R >.toString(), net.sf.gridarta.gui.undo.UndoControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.UndoControl(), net.sf.gridarta.var.crossfire.gui.map.renderer.FlatMapRenderer.updateSquare(), net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.updateTilePaths(), net.sf.gridarta.gui.dialog.shrinkmapsize.ShrinkMapSizeDialog< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updateWarnings(), net.sf.gridarta.var.crossfire.model.validation.checks.NonAbsoluteExitPathChecker.validateGameObject(), and net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.validateMapSizes().
| MapFile net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapFile | ( | ) |
Returns the map file.
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.action.AddBookmarkAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doAddBookmark(), net.sf.gridarta.gui.map.mapactions.MapActions< G, A, R >.doCreateTile(), net.sf.gridarta.actions.ExitConnectorActions< G, A, R >.doExitConnect(), net.sf.gridarta.actions.ExitConnectorActions< G, A, R >.doExitCopy(), net.sf.gridarta.actions.ExitConnectorActions< G, A, R >.doExitPaste(), net.sf.gridarta.actions.AbstractServerActions< GameObject, MapArchObject, Archetype >.doOpenInClient(), net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doReloadMap(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserControl<?, ?, ?>.doRevertPickmap(), net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.getLocalMapDir(), net.sf.gridarta.gui.dialog.plugin.parameter.map.MapParameterView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.MapParameterView(), net.sf.gridarta.model.maplocation.MapLocation.newAbsoluteMapLocation(), net.sf.gridarta.gui.misc.RecentManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.RecentManager(), net.sf.gridarta.model.mapcontrol.DefaultMapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.save(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapFromXml3(), net.sf.gridarta.model.mapcontrol.DefaultMapControlTest.testSaveAs1(), net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.updateTilePaths(), net.sf.gridarta.model.validation.checks.ExitChecker< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.validateGameObject(), and net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.validateMapSizes().
Here is the caller graph for this function:| MapFile net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapFile | ( | @NotNull MapPath | mapPath | ) | throws SameMapException, UnsavedMapException |
Returns the map file for a map that can be reached by following a MapPath from this map.
| mapPath | the map path to follow |
| SameMapException | of the destination map file is the same as this map file |
| UnsavedMapException | if this map is not saved and therefore its map file is unknown |
| MapSquare<G, A, R> net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapSquare | ( | @NotNull Point | pos | ) |
Get the square at a specified location.
| pos | location to get square at |
| IndexOutOfBoundsException | in case p specifies a location that's not valid within this map model |
Referenced by net.sf.gridarta.model.mapmodel.TopLevelGameObjectIteratorTest.createMap(), net.sf.gridarta.gui.panel.tools.DeletionTool< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.deleteArch(), 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.gui.panel.tools.InsertionTool< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doInsert(), net.sf.gridarta.gui.map.renderer.AbstractIsoMapRenderer< G, A, R >.getFullImage(), net.sf.gridarta.gui.map.mapview.AbstractMapView< TestGameObject, TestMapArchObject, TestArchetype >.getSelectedSquares(), net.sf.gridarta.gui.map.renderer.AbstractIsoMapRenderer< G, A, R >.getSquareLocationAt(), net.sf.gridarta.gui.map.renderer.AbstractMapRenderer< TestGameObject, TestMapArchObject, TestArchetype >.getToolTipText(), net.sf.gridarta.model.gameobject.DefaultIsoGameObject< TestGameObject, TestMapArchObject, TestArchetype >.getYFloorOffset(), net.sf.gridarta.model.mapmodel.LightMapModelTracker< G, A, R >.mapSizeChanging(), net.sf.gridarta.model.mapmodel.MapSquareIterator< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.next(), net.sf.gridarta.gui.map.renderer.AbstractSimpleIsoMapRenderer< G, A, R >.paintComponent2(), net.sf.gridarta.gui.map.renderer.AbstractIsoMapRenderer< G, A, R >.paintComponent2(), net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.paintMap(), net.sf.gridarta.gui.map.renderer.AbstractIsoMapRenderer< G, A, R >.paintMapSelection(), net.sf.gridarta.var.crossfire.gui.map.renderer.SmoothingRenderer.paintSmooth(), net.sf.gridarta.var.crossfire.gui.map.renderer.SimpleFlatMapRenderer.paintSquare(), net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.paintSquareSelection(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.pasteTiled(), net.sf.gridarta.gui.map.renderer.AbstractIsoMapRenderer< G, A, R >.resizeFromModel(), net.sf.gridarta.model.mapcursor.MapCursor< G, A, R >.selectMapSquare(), net.sf.gridarta.model.mapmodel.LightMapModelTracker< G, A, R >.setLightRadius(), net.sf.gridarta.gui.misc.ShiftProcessor< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.shift(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti3(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti4(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle2(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle3(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvIntoHead1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvMulti1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvSingle1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpSingle(), net.sf.gridarta.model.floodfill.FillUtilsTest.testFillAdjacent(), net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.testInsertSystemObject1(), net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.testInsertSystemObject2(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testModifiedGameObject1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testModifiedGameObject2(), net.sf.gridarta.action.SelectedSquareActionsTest.testMoveTailPart(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testResizeMap4(), net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testSetObjectTextAttributeOrdering(), net.sf.gridarta.gui.map.renderer.AbstractIsoMapRenderer< G, A, R >.tileStretchingOffsets(), net.sf.gridarta.gui.panel.objectchooser.DefaultObjectChooser< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.updatePickmapInfo(), and net.sf.gridarta.var.crossfire.gui.map.renderer.FlatMapRenderer.updateSquare().
| int net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getTransactionDepth | ( | ) |
Get the transaction depth, which is the number of beginTransaction(String) invocations without matching endTransaction() invocations.
A transaction depth of 0 means there is no ongoing transaction.
| G net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.insertArchToMap | ( | @NotNull BaseObject< G, A, R, ?> | templateBaseObject, |
| @Nullable G | nextGameObject, | ||
| @NotNull Point | pos, | ||
| boolean | join | ||
| ) |
Insert a game object to the map at a specified position.
This function allows either to choose from the archetypes or to insert a copy from an existing game object. It also works for container-inventory.
| templateBaseObject | a clone copy of this game object gets inserted to the map; it can be an archetype of a game object |
| nextGameObject | the new game object gets inserted before this; if null |
| pos | the map position to insert the new game object |
| join | if set, auto-joining is supported |
Referenced by net.sf.gridarta.gui.dialog.replace.ReplaceDialog< G, A, R >.doReplace(), net.sf.gridarta.model.mapcursor.MapCursor< G, A, R >.insertGameObject(), net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesControl< G, A, R >.mapArchAddEnv(), and net.sf.gridarta.model.io.DefaultMapReaderTest.testReorderMultiSquares().
Here is the caller graph for this function:| G net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.insertBaseObject | ( | @NotNull BaseObject< G, A, R, ?> | baseObject, |
| @NotNull Point | pos, | ||
| boolean | allowMany, | ||
| boolean | join, | ||
| @NotNull InsertionMode< G, A, R > | insertionMode | ||
| ) |
Inserts a BaseObject to a map.
Archetypes are instantiated, game objects are cloned. The direction of the inserted game object is set to the direction of the archetype chooser. This function allows multi-square game objects.
| baseObject | the base object |
| pos | the insert-location on this map |
| allowMany | whether duplicates are allowed |
| join | whether to auto-join the inserted game object |
| insertionMode | the insertion mode to use |
Referenced by 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.gui.dialog.replace.ReplaceDialog< G, A, R >.doReplace(), net.sf.gridarta.gui.misc.ShiftProcessor< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.insertAllAndClear(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.paste(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.pasteTiled(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testEditType1(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testGetAllGameObjects1(), and net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testUpdateDirectionOnInsert().
Here is the caller graph for this function:| boolean net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.isAnyTransactionActive | ( | ) |
Returns whether a transaction is currently active.
This method will return
if and only if getTransactionDepth() returns a value greater than zero.
| boolean net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.isAreaEmpty | ( | int | left, |
| int | top, | ||
| int | width, | ||
| int | height | ||
| ) |
Checks whether an area of a map is completely empty.
| left | the left border of the area |
| top | the top border of the area |
| width | the with of the area |
| height | the height of the area |
| boolean net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.isEmpty | ( | ) |
Returns whether the map is empty.
Referenced by net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.isEmpty().
Here is the caller graph for this function:| boolean net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.isModified | ( | ) |
Return whether the map has been modified from the on-disk state.
Referenced by net.sf.gridarta.actions.ExitConnectorActions< G, A, R >.doExitConnect(), net.sf.gridarta.actions.AbstractServerActions< GameObject, MapArchObject, Archetype >.doOpenInClient(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserControl<?, ?, ?>.doRevertPickmap(), net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doSaveMap(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserControl<?, ?, ?>.doSavePickmap(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.getTitle(), net.sf.gridarta.gui.mapfiles.PickmapState< G, A, R >.getUnsavedPickmaps(), net.sf.gridarta.model.mapcontrol.DefaultMapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.save(), net.sf.gridarta.gui.mapfiles.PickmapState< G, A, R >.save(), net.sf.gridarta.model.mapcontrol.DefaultMapControlTest.testSaveAs1(), and net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testSetObjectTextAttributeOrdering().
Here is the caller graph for this function:| boolean net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.isMultiArchFittingToMap | ( | @NotNull Archetype< G, A, R > | archetype, |
| @NotNull Point | pos, | ||
| boolean | allowDouble | ||
| ) |
Checks whether an GameObject (multi-arch) would still fit on this map.
| archetype | the archetype to check |
| pos | position of multi-square head |
| allowDouble | whether overlapping multi-square arches should be allowed (check is done using the archetype name) |
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.mapClosed | ( | ) |
This function must be called if this instance is freed.
| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.moveEnv | ( | @NotNull G | gameObject, |
| @NotNull Point | pos, | ||
| @NotNull G | nextGameObject | ||
| ) |
Moves a GameObject to its environment.
| gameObject | the game object to move |
| pos | the insertion position |
| nextGameObject | the next game object |
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.moveInv | ( | @NotNull G | gameObject, |
| @NotNull GameObject< G, A, R > | prevGameObject | ||
| ) |
Moves a GameObject to the inventory of another game object.
| gameObject | the game object to move |
| prevGameObject | the previous game object |
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.nextPoint | ( | Point | point, |
| int | direction | ||
| ) |
Moves the given point forward or backward one map square.
| point | the point to start with and modify |
| direction | the direction ( -1 +1 |
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.removeGameObject | ( | @NotNull G | gameObject, |
| boolean | join | ||
| ) |
Delete an existing GameObject from the map.
| gameObject | the game object to remove |
| join | if set, auto-joining is supported |
Referenced by net.sf.gridarta.gui.panel.tools.DeletionTool< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.deleteArch(), net.sf.gridarta.model.mapcursor.MapCursor< G, A, R >.deleteSelectedGameObject(), net.sf.gridarta.gui.panel.gameobjectattributes.GameObjectAttributesControl< G, A, R >.mapArchAddEnv(), net.sf.gridarta.model.mapmodel.DefaultMapModelTest.testEditType1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemove1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt2(), and net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt3().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.removeMapModelListener | ( | @NotNull MapModelListener< G, A, R > | listener | ) |
Unregister a map listener.
| listener | the listener to unregister |
Referenced by net.sf.gridarta.gui.map.mapview.ErroneousMapSquares< G, A, R >.closeNotify(), net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.closeNotify(), net.sf.gridarta.gui.map.mapview.DefaultMapView< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.closeNotify(), net.sf.gridarta.var.crossfire.gui.map.renderer.AbstractFlatMapRenderer.closeNotify(), net.sf.gridarta.gui.map.renderer.AbstractIsoMapRenderer< G, A, R >.closeNotify(), net.sf.gridarta.gui.copybuffer.CopyBuffer< G, A, R >.removeMapModelListener(), and net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserControl<?, ?, ?>.setCurrentPickmap().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.removeMapTransactionListener | ( | @NotNull MapTransactionListener< G, A, R > | listener | ) |
Unregisters a map transaction listener.
| listener | the listener to unregister |
| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.resetModified | ( | ) |
Resets the modified flag to false.
Referenced by net.sf.gridarta.model.mapcontrol.TestMapControlFactory.newMapControl(), net.sf.gridarta.var.atrinik.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.daimonin.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.crossfire.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.crossfire.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.var.daimonin.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.var.atrinik.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.model.mapcontrol.DefaultMapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.save(), and net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testSetObjectTextAttributeOrdering().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setErrors | ( | @NotNull ErrorCollector< G, A, R > | errors | ) |
Sets the errors in this map.
| errors | the errors |
| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setMapFile | ( | @Nullable MapFile | mapFile | ) |
Sets the map file.
| mapFile | the map file or null |
Referenced by net.sf.gridarta.model.mapcontrol.TestMapControlFactory.newMapControl(), net.sf.gridarta.var.atrinik.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.daimonin.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.crossfire.model.mapcontrol.DefaultMapControlFactory.newMapControl(), net.sf.gridarta.var.crossfire.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.var.daimonin.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.var.atrinik.model.mapcontrol.DefaultMapControlFactory.newPickmapControl(), net.sf.gridarta.model.mapcontrol.DefaultMapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.saveAs(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitCopy1(), and net.sf.gridarta.actions.ExitConnectorActionsTest.testExitPaste2().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.transientGameObjectChange | ( | @NotNull G | gameObject | ) |
Method to notify the model that a game object was changed but need not be restored by undo/redo.
A change to a game object is atomic if getTransactionDepth() returns 0, otherwise it is transactional. The model then notifies the registered listeners of the changes.
| gameObject | the game object that has changed |
Referenced by net.sf.gridarta.model.gameobject.AbstractGameObject< GameObject, MapArchObject, Archetype >.notifyTransientChange().
Here is the caller graph for this function: