|
Gridarta Editor
|
Default FileControl implementation. More...
Inheritance diagram for net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
Collaboration diagram for net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:Public Member Functions | |
| boolean | closeAllMaps () |
| Invoked when the user wants to close all maps. More... | |
| boolean | confirmSaveChanges (@NotNull final MapControl< G, A, R > mapControl) |
| Asks the user whether to save changes of a map. More... | |
| DefaultFileControl (@NotNull final ProjectSettings projectSettings, @NotNull final VolatileSettings volatileSettings, @NotNull final MapImageCache< G, A, R > mapImageCache, @NotNull final MapManager< G, A, R > mapManager, @NotNull final MapViewsManager< G, A, R > mapViewsManager, @NotNull final Component parent, @NotNull final FileFilter mapFileFilter, @NotNull final FileFilter scriptFileFilter, @NotNull final NewMapDialogFactory< G, A, R > newMapDialogFactory, @NotNull final String scriptExtension, @NotNull final ScriptEditControl scriptEditControl, @NotNull final PathManager pathManager) | |
| Creates a new instance. More... | |
| void | openFile (final boolean mapFile) |
| The user wants to edit a file. More... | |
| void | reportLoadError (@Nullable final File file, @NotNull final String message) |
| void | reportOutOfMapBoundsDeleted (@NotNull final File file, final int outOfMapBoundsDeleted, @NotNull final StringBuilder outOfMapBoundsObjects) |
| void | reportOutOfMemory (@NotNull final File file) |
| void | reportSaveError (@NotNull final MapControl< G, A, R > mapControl, @NotNull final String message) |
| Reports an error while saving a map file to the user. More... | |
| void | reportSaveError (@NotNull final File mapFile, @NotNull final String message) |
| Reports an error while saving a map file to the user. More... | |
| void | reportTeleportCharacterError (@NotNull final String mapPath, @NotNull final String message) |
| Reports an error while teleporting a character to the current map. More... | |
| boolean | save (@NotNull final MapControl< G, A, R > mapControl) |
| Save one map. More... | |
| void | saveAllMaps () |
| Saves all maps. More... | |
| boolean | saveAs (@NotNull final MapControl< G, A, R > mapControl) |
| Asks the user for a filename, then saves the map. More... | |
Private Member Functions | |
| JFileChooser | createFileChooser () |
| Creates the JFileChooser for opening a file. More... | |
| File | saveMapAs (@NotNull final MapControl< G, A, R > mapControl) |
| Displays a "save as" dialog. More... | |
Static Private Attributes | |
| static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
| The ActionBuilder. More... | |
Default FileControl implementation.
Asks the user for directions.
Definition at line 55 of file DefaultFileControl.java.
| net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.DefaultFileControl | ( | @NotNull final ProjectSettings | projectSettings, |
| @NotNull final VolatileSettings | volatileSettings, | ||
| @NotNull final MapImageCache< G, A, R > | mapImageCache, | ||
| @NotNull final MapManager< G, A, R > | mapManager, | ||
| @NotNull final MapViewsManager< G, A, R > | mapViewsManager, | ||
| @NotNull final Component | parent, | ||
| @NotNull final FileFilter | mapFileFilter, | ||
| @NotNull final FileFilter | scriptFileFilter, | ||
| @NotNull final NewMapDialogFactory< G, A, R > | newMapDialogFactory, | ||
| @NotNull final String | scriptExtension, | ||
| @NotNull final ScriptEditControl | scriptEditControl, | ||
| @NotNull final PathManager | pathManager | ||
| ) |
Creates a new instance.
| projectSettings | the project settings instance |
| volatileSettings | the volatile settings instance |
| mapImageCache | the map image cache |
| mapManager | the map manager |
| mapViewsManager | the map views manager |
| parent | the parent component for showing dialog boxes |
| mapFileFilter | the file filter for selecting map files |
| scriptFileFilter | the file filter for selecting script files |
| newMapDialogFactory | the new map dialog factory |
| scriptExtension | the file extension for script files |
| scriptEditControl | the script edit control to forward to |
| pathManager | the path manager for creating map file instances |
Definition at line 157 of file DefaultFileControl.java.
| boolean net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.closeAllMaps | ( | ) |
Invoked when the user wants to close all maps.
Definition at line 257 of file DefaultFileControl.java.
Here is the caller graph for this function:| boolean net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.confirmSaveChanges | ( | @NotNull final MapControl< G, A, R > | mapControl | ) |
Asks the user whether to save changes of a map.
Returns
(and does not ask the user) if the map is unmodified.
| mapControl | the map |
Definition at line 333 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.closeAllMaps().
Here is the caller graph for this function:
|
private |
Creates the JFileChooser for opening a file.
Definition at line 177 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.openFile().
Here is the caller graph for this function:| void net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.openFile | ( | final boolean | mapFile | ) |
The user wants to edit a file.
| mapFile |
Definition at line 192 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.action.EditScriptAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.editScript(), and net.sf.gridarta.action.OpenFileAction< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.openFile().
Here is the caller graph for this function:| void net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reportLoadError | ( | @Nullable final File | file, |
| @NotNull final String | message | ||
| ) |
Definition at line 361 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.openFile(), and net.sf.gridarta.maincontrol.GUIMainControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.openFiles().
Here is the caller graph for this function:| void net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reportOutOfMapBoundsDeleted | ( | @NotNull final File | file, |
| final int | outOfMapBoundsDeleted, | ||
| @NotNull final StringBuilder | outOfMapBoundsObjects | ||
| ) |
Definition at line 366 of file DefaultFileControl.java.
| void net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reportOutOfMemory | ( | @NotNull final File | file | ) |
Definition at line 371 of file DefaultFileControl.java.
| void net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reportSaveError | ( | @NotNull final MapControl< G, A, R > | mapControl, |
| @NotNull final String | message | ||
| ) |
Reports an error while saving a map file to the user.
| mapControl | the map control that failed saving |
| message | the error message |
Definition at line 349 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.reportSaveError(), net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.save(), and net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.saveAs().
Here is the caller graph for this function:| void net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reportSaveError | ( | @NotNull final File | mapFile, |
| @NotNull final String | message | ||
| ) |
Reports an error while saving a map file to the user.
| mapFile | the map file that failed saving |
| message | the error message |
Definition at line 356 of file DefaultFileControl.java.
| void net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reportTeleportCharacterError | ( | @NotNull final String | mapPath, |
| @NotNull final String | message | ||
| ) |
Reports an error while teleporting a character to the current map.
| mapPath | the map path to teleport to |
| message | the error message |
Definition at line 376 of file DefaultFileControl.java.
| boolean net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.save | ( | @NotNull final MapControl< G, A, R > | mapControl | ) |
Save one map.
| mapControl | the map |
Definition at line 232 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.confirmSaveChanges(), and net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.saveAllMaps().
Here is the caller graph for this function:| void net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.saveAllMaps | ( | ) |
Saves all maps.
Definition at line 248 of file DefaultFileControl.java.
Here is the caller graph for this function:| boolean net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.saveAs | ( | @NotNull final MapControl< G, A, R > | mapControl | ) |
Asks the user for a filename, then saves the map.
| mapControl | the map |
Definition at line 275 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.save().
Here is the caller graph for this function:
|
private |
Displays a "save as" dialog.
| mapControl | the map control for the dialog |
Definition at line 297 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.saveAs().
Here is the caller graph for this function:
|
staticprivate |
The ActionBuilder.
Definition at line 61 of file DefaultFileControl.java.
|
private |
The JFileChooser for opening a file.
Set to
if not yet created.
Definition at line 140 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.openFile().
|
private |
The FileFilter for selecting map files.
Definition at line 103 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().
|
private |
The MapImageCache.
Definition at line 79 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().
|
private |
The MapManager.
Definition at line 85 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().
|
private |
The MapViewsManager.
Definition at line 91 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().
|
private |
The NewMapDialogFactory.
Definition at line 115 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().
|
private |
The parent component for showing dialog boxes.
Definition at line 97 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().
|
private |
The PathManager for creating MapFile instances.
Definition at line 133 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().
|
private |
The ProjectSettings.
Definition at line 67 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().
|
private |
The ScriptEditControl to forward to.
Definition at line 127 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().
|
private |
The file extension for script files.
Definition at line 121 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().
|
private |
The FileFilter for selecting script files.
Definition at line 109 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().
|
private |
The VolatileSettings.
Definition at line 73 of file DefaultFileControl.java.
Referenced by net.sf.gridarta.gui.misc.DefaultFileControl< G, A, R >.DefaultFileControl().