|
Gridarta Editor
|
Abstract base class for MapManager implementations. More...
Inheritance diagram for net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
Collaboration diagram for net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:Public Member Functions | |
| void | addMapManagerListener (@NotNull final MapManagerListener< G, A, R > listener) |
| void | closeMap (@NotNull final MapControl< G, A, R > mapControl) |
| MapControl< G, A, R > | getCurrentMap () |
| Returns the current top map we are working with. More... | |
| File | getLocalMapDir () |
| List< MapControl< G, A, R > > | getOpenedMaps () |
| MapControl< G, A, R > | getOpenMap () |
| MapControl< G, A, R > | newMap (@Nullable final List< G > objects, @NotNull final A mapArchObject, @Nullable final MapFile mapFile, final boolean interactive) |
| MapControl< G, A, R > | openMapFile (@NotNull final MapFile mapFile, final boolean interactive) throws IOException |
| MapControl< G, A, R > | openMapFile (@NotNull final File file, final boolean interactive) throws IOException |
| void | release (@NotNull final MapControl< G, A, R > mapControl) |
| void | removeMapManagerListener (@NotNull final MapManagerListener< G, A, R > listener) |
| void | revert (@NotNull final MapControl< G, A, R > mapControl) throws IOException |
| void | setCurrentMap (@Nullable final MapControl< G, A, R > mapControl) |
| void | setFileControl (@NotNull final FileControl< G, A, R > fileControl) |
Public Member Functions inherited from net.sf.gridarta.model.mapmanager.MapManager< G, A, R > | |
| 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... | |
Protected Member Functions | |
| AbstractMapManager (@NotNull final MapReaderFactory< G, A > mapReaderFactory, @NotNull final ProjectSettings projectSettings, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final PathManager pathManager) | |
| Create a new map manager. More... | |
| abstract MapControl< G, A, R > | createMapControl (@Nullable List< G > objects, @NotNull A mapArchObject, @Nullable MapFile mapFile) |
| Creates a new MapControl instance. More... | |
Private Member Functions | |
| MapReader< G, A > | decodeMapFile (@NotNull final File file, final boolean interactive) throws IOException |
| Load a map file. More... | |
Private Attributes | |
| MapControl< G, A, R > | currentMapControl |
| The current top map we are working with. More... | |
| FileControl< G, A, R > | fileControl |
| The main control. More... | |
| final EventListenerList2< MapManagerListener< G, A, R > > | listenerList = new EventListenerList2<>(MapManagerListener.class) |
| The MapManagerListeners to inform of changes. More... | |
| final List< MapControl< G, A, R > > | mapControls = new CopyOnWriteArrayList<>() |
| All open maps. More... | |
| final MapReaderFactory< G, A > | mapReaderFactory |
| The gridarta objects factory instance. More... | |
| final PathManager | pathManager |
| The PathManager for converting File instances. More... | |
| final ProjectSettings | projectSettings |
| The project settings instance. More... | |
Static Private Attributes | |
| static final int | DELETED_OBJECTS_TO_REPORT = 10 |
| The maximum number of deleted game objects to report. More... | |
Abstract base class for MapManager implementations.
Definition at line 48 of file AbstractMapManager.java.
|
protected |
Create a new map manager.
| mapReaderFactory | the map reader factory instance |
| projectSettings | the project settings instance |
| faceObjectProviders | the face object providers |
| pathManager | the path manager for converting file instances |
Definition at line 102 of file AbstractMapManager.java.
| void net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.addMapManagerListener | ( | @NotNull final MapManagerListener< G, A, R > | listener | ) |
Definition at line 292 of file AbstractMapManager.java.
| void net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.closeMap | ( | @NotNull final MapControl< G, A, R > | mapControl | ) |
Definition at line 165 of file AbstractMapManager.java.
Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.release().
Here is the caller graph for this function:
|
abstractprotected |
Creates a new MapControl instance.
| objects | the objects to insert into the new map |
| mapArchObject | the map arch object to use for the new map |
| mapFile | the associated map file |
Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.newMap().
Here is the caller graph for this function:
|
private |
Load a map file.
| 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 |
Definition at line 213 of file AbstractMapManager.java.
Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.openMapFile(), and net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.revert().
Here is the caller graph for this function:| MapControl<G, A, R> net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getCurrentMap | ( | ) |
Returns the current top map we are working with.
Definition at line 287 of file AbstractMapManager.java.
| File net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getLocalMapDir | ( | ) |
Definition at line 329 of file AbstractMapManager.java.
| List<MapControl<G, A, R> > net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getOpenedMaps | ( | ) |
Definition at line 276 of file AbstractMapManager.java.
| MapControl<G, A, R> net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getOpenMap | ( | ) |
Definition at line 151 of file AbstractMapManager.java.
| MapControl<G, A, R> net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.newMap | ( | @Nullable final List< G > | objects, |
| @NotNull final A | mapArchObject, | ||
| @Nullable final MapFile | mapFile, | ||
| final boolean | interactive | ||
| ) |
Definition at line 127 of file AbstractMapManager.java.
Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.openMapFile().
Here is the caller graph for this function:| MapControl<G, A, R> net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.openMapFile | ( | @NotNull final MapFile | mapFile, |
| final boolean | interactive | ||
| ) | throws IOException |
Definition at line 182 of file AbstractMapManager.java.
Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.openMapFile().
Here is the caller graph for this function:| MapControl<G, A, R> net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.openMapFile | ( | @NotNull final File | file, |
| final boolean | interactive | ||
| ) | throws IOException |
Definition at line 199 of file AbstractMapManager.java.
| void net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.release | ( | @NotNull final MapControl< G, A, R > | mapControl | ) |
Definition at line 344 of file AbstractMapManager.java.
| void net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.removeMapManagerListener | ( | @NotNull final MapManagerListener< G, A, R > | listener | ) |
Definition at line 297 of file AbstractMapManager.java.
| void net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.revert | ( | @NotNull final MapControl< G, A, R > | mapControl | ) | throws IOException |
Definition at line 302 of file AbstractMapManager.java.
| void net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setCurrentMap | ( | @Nullable final MapControl< G, A, R > | mapControl | ) |
Definition at line 262 of file AbstractMapManager.java.
Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.closeMap(), and net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.newMap().
Here is the caller graph for this function:| void net.sf.gridarta.model.mapmanager.AbstractMapManager< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setFileControl | ( | @NotNull final FileControl< G, A, R > | fileControl | ) |
Definition at line 121 of file AbstractMapManager.java.
Referenced by net.sf.gridarta.model.mapcontrol.TestMapControlCreator.TestMapControlCreator().
Here is the caller graph for this function:
|
private |
The current top map we are working with.
Definition at line 93 of file AbstractMapManager.java.
Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.getCurrentMap(), net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.getLocalMapDir(), and net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.getOpenMap().
|
staticprivate |
The maximum number of deleted game objects to report.
Definition at line 53 of file AbstractMapManager.java.
|
private |
The main control.
Definition at line 59 of file AbstractMapManager.java.
Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.setFileControl().
|
private |
The MapManagerListeners to inform of changes.
Definition at line 87 of file AbstractMapManager.java.
|
private |
All open maps.
Definition at line 82 of file AbstractMapManager.java.
|
private |
The gridarta objects factory instance.
Definition at line 71 of file AbstractMapManager.java.
Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.AbstractMapManager().
|
private |
The PathManager for converting File instances.
Definition at line 77 of file AbstractMapManager.java.
Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.AbstractMapManager().
|
private |
The project settings instance.
Definition at line 65 of file AbstractMapManager.java.
Referenced by net.sf.gridarta.model.mapmanager.AbstractMapManager< G, A, R >.AbstractMapManager().