|
Gridarta Editor
|
A MapManager manages all opened maps. More...
Inheritance diagram for net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
Collaboration diagram for net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:Public Member Functions | |
| void | addMapManagerListener (@NotNull MapManagerListener< G, A, R > listener) |
| Adds a MapManagerListener to be notified. More... | |
| void | closeMap (@NotNull MapControl< G, A, R > mapControl) |
| Closes the given map, ignoring modified status. More... | |
| MapControl< G, A, R > | getCurrentMap () |
| Returns the current map. More... | |
| File | getLocalMapDir () |
| Returns a guess for a script directory to use. More... | |
| List< MapControl< G, A, R > > | getOpenedMaps () |
| Returns all opened maps. More... | |
| MapControl< G, A, R > | getOpenMap () |
| Returns one open map. More... | |
| MapControl< G, A, R > | newMap (@Nullable List< G > objects, @NotNull A mapArchObject, @Nullable MapFile mapFile, boolean interactive) |
| Creates a new map control without view. More... | |
| MapControl< G, A, R > | openMapFile (@NotNull MapFile mapFile, boolean interactive) throws IOException |
| Loads a map file. More... | |
| MapControl< G, A, R > | openMapFile (@NotNull File file, boolean interactive) throws IOException |
| Loads a map file. More... | |
| void | release (@NotNull MapControl< G, A, R > mapControl) |
| Releases a MapControl instance. More... | |
| void | removeMapManagerListener (@NotNull MapManagerListener< G, A, R > listener) |
| Removes a MapManagerListener to be notified. More... | |
| void | revert (@NotNull MapControl< G, A, R > mapControl) throws IOException |
| Reverts one map. More... | |
| void | setCurrentMap (@Nullable MapControl< G, A, R > mapControl) |
| Sets the given map as the current one. More... | |
A MapManager manages all opened maps.
Definition at line 37 of file MapManager.java.
| void net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addMapManagerListener | ( | @NotNull MapManagerListener< G, A, R > | listener | ) |
Adds a MapManagerListener to be notified.
| listener | the listener to add |
Referenced by net.sf.gridarta.gui.delayedmapmodel.DelayedMapModelListenerManager< G, A, R >.DelayedMapModelListenerManager(), net.sf.gridarta.model.index.MapsIndexer< G, A, R >.start(), and net.sf.gridarta.gui.mapdesktop.WindowAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.WindowAction().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.closeMap | ( | @NotNull MapControl< G, A, R > | mapControl | ) |
Closes the given map, ignoring modified status.
| mapControl | the map to close |
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.closeAllMaps(), and net.sf.gridarta.gui.map.mapview.MapViewsManager<?, ?, ?>.closeMapView().
Here is the caller graph for this function:| MapControl<G, A, R> net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getCurrentMap | ( | ) |
Returns the current map.
Referenced by 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.dialog.plugin.parameter.map.MapParameterCellRenderer.getListCellRendererComponent(), net.sf.gridarta.plugin.parameter.MapParameter< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getValue(), net.sf.gridarta.gui.dialog.goexit.GoExitDialogManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.goExit(), and net.sf.gridarta.action.ZoomAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.zoom().
Here is the caller graph for this function:| File net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getLocalMapDir | ( | ) |
Returns a guess for a script directory to use.
Referenced by net.sf.gridarta.gui.scripts.ScriptArchEditor< G, A, R >.addEventScript(), and net.sf.gridarta.gui.scripts.ScriptArchEditor< G, A, R >.createNewEvent().
Here is the caller graph for this function:| List<MapControl<G, A, R> > net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getOpenedMaps | ( | ) |
Returns all opened maps.
Referenced by net.sf.gridarta.gui.delayedmapmodel.DelayedMapModelListenerManager< G, A, R >.addDelayedMapModelListener(), net.sf.gridarta.gui.map.mapview.MapViewsManager<?, ?, ?>.addEditType(), net.sf.gridarta.gui.dialog.plugin.parameter.map.MapParameterComboBoxModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getElementAt(), net.sf.gridarta.gui.dialog.plugin.parameter.map.MapParameterComboBoxModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getIndexOf(), net.sf.gridarta.gui.dialog.plugin.parameter.map.MapParameterComboBoxModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getSize(), net.sf.gridarta.gui.map.mapview.MapViewsManager<?, ?, ?>.refreshAllMaps(), net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.saveAllMaps(), net.sf.gridarta.gui.delayedmapmodel.DelayedMapModelListenerManager< G, A, R >.scheduleAllMapModels(), net.sf.gridarta.model.index.MapsIndexer< G, A, R >.stop(), and net.sf.gridarta.updater.UpdaterManager.update().
Here is the caller graph for this function:| MapControl<G, A, R> net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getOpenMap | ( | ) |
Returns one open map.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.closeAllMaps().
Here is the caller graph for this function:| MapControl<G, A, R> net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.newMap | ( | @Nullable List< G > | objects, |
| @NotNull A | mapArchObject, | ||
| @Nullable MapFile | mapFile, | ||
| boolean | interactive | ||
| ) |
Creates a new map control without view.
The returned instance must be freed with release(MapControl) when not needed anymore.
| objects | the game objects to insert; may be null |
| mapArchObject | the map arch object for the new map |
| mapFile | the map file, or null |
| interactive | if set, the new map becomes the current map |
Referenced by net.sf.gridarta.gui.map.mapactions.MapActions< G, A, R >.doCreateTile(), net.sf.gridarta.gui.mapfiles.PickmapState< G, A, R >.loadPickmap(), net.sf.gridarta.model.mapcontrol.TestMapControlCreator.newMapControl(), net.sf.gridarta.gui.map.mapview.MapViewsManager<?, ?, ?>.newMapWithView(), and net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.newPickmap().
Here is the caller graph for this function:| MapControl<G, A, R> net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.openMapFile | ( | @NotNull MapFile | mapFile, |
| boolean | interactive | ||
| ) | throws IOException |
Loads a map file.
The returned instance must be freed with release(MapControl) when not needed anymore.
| mapFile | the map file to load |
| interactive | if set, may ask to delete undefined archetypes; if unset, keep undefined archetypes |
| IOException | if an I/O error occurs |
Referenced by net.sf.gridarta.actions.ExitConnectorActions< G, A, R >.doExitConnect(), net.sf.gridarta.plugin.parameter.MapParameter< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getValue(), net.sf.gridarta.model.index.MapsIndexer< G, A, R >.indexPendingMaps(), net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.loadMapControl(), net.sf.gridarta.gui.map.renderer.ImageCreator<?, ?, ?>.makeImage(), net.sf.gridarta.gui.map.mapview.MapViewsManager<?, ?, ?>.openMapFileWithView(), and net.sf.gridarta.gui.mapimagecache.MapImageCache<?, ?, ?>.updateCaches().
Here is the caller graph for this function:| MapControl<G, A, R> net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.openMapFile | ( | @NotNull File | file, |
| boolean | interactive | ||
| ) | throws IOException |
Loads a map file.
The returned instance must be freed with release(MapControl) when not needed anymore.
| file | the map file to load |
| interactive | if set, may ask to delete undefined archetypes; if unset, keep undefined archetypes |
| IOException | if an I/O error occurs |
| void net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.release | ( | @NotNull MapControl< G, A, R > | mapControl | ) |
Releases a MapControl instance.
| mapControl | the map control instance |
Referenced by net.sf.gridarta.actions.AttachTiledMaps< G, A, R >.attachTiledMaps(), net.sf.gridarta.gui.map.mapactions.MapActions< G, A, R >.doCreateTile(), net.sf.gridarta.actions.ExitConnectorActions< G, A, R >.doExitConnect(), net.sf.gridarta.gui.mapfiles.PickmapState< G, A, R >.freePickmap(), net.sf.gridarta.model.index.MapsIndexer< G, A, R >.indexPendingMaps(), net.sf.gridarta.gui.map.renderer.ImageCreator<?, ?, ?>.makeImage(), net.sf.gridarta.gui.map.mapview.MapViewsManager<?, ?, ?>.newMapWithView(), net.sf.gridarta.gui.panel.pickmapchooser.PickmapChooserView< G, A, R >.newPickmap(), net.sf.gridarta.gui.map.mapview.MapViewsManager<?, ?, ?>.openMapFileWithView(), and net.sf.gridarta.gui.mapimagecache.MapImageCache<?, ?, ?>.updateCaches().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.removeMapManagerListener | ( | @NotNull MapManagerListener< G, A, R > | listener | ) |
Removes a MapManagerListener to be notified.
| listener | the listener to remove |
Referenced by net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.closeNotify(), and net.sf.gridarta.model.index.MapsIndexer< G, A, R >.stop().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.revert | ( | @NotNull MapControl< G, A, R > | mapControl | ) | throws IOException |
Reverts one map.
| mapControl | the map to revert |
| IOException | if an I/O error occurs |
Referenced by net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doReloadMap(), and net.sf.gridarta.model.mapmanager.DefaultMapManagerTest.testRevertResizedMap().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmanager.MapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setCurrentMap | ( | @Nullable MapControl< G, A, R > | mapControl | ) |
Sets the given map as the current one.
| mapControl | the MapControl |
Referenced by net.sf.gridarta.gui.mapdesktop.MapDesktop< G, A, R >.activateAndRaiseMapView(), net.sf.gridarta.gui.mapdesktop.MapDesktop< G, A, R >.mapViewFocusGainedNotify(), and net.sf.gridarta.gui.mapdesktop.MapDesktop< G, A, R >.updateFocus().
Here is the caller graph for this function: