public interface FileControl<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
| Modifier and Type | Method and Description |
|---|---|
boolean |
closeAllMaps()
Invoked when the user wants to close all maps.
|
boolean |
confirmSaveChanges(@NotNull MapControl<G,A,R> mapControl)
Asks the user whether to save changes of a map.
|
void |
openFile(boolean mapFile)
The user wants to edit a file.
|
void |
reportLoadError(@Nullable java.io.File file,
@NotNull java.lang.String message) |
void |
reportOutOfMapBoundsDeleted(@NotNull java.io.File file,
int outOfMapBoundsDeleted,
@NotNull java.lang.StringBuilder outOfMapBoundsObjects) |
void |
reportOutOfMemory(@NotNull java.io.File file) |
void |
reportSaveError(@NotNull java.io.File mapFile,
@NotNull java.lang.String message)
Reports an error while saving a map file to the user.
|
void |
reportSaveError(@NotNull MapControl<G,A,R> mapControl,
@NotNull java.lang.String message)
Reports an error while saving a map file to the user.
|
void |
reportTeleportCharacterError(@NotNull java.lang.String mapPath,
@NotNull java.lang.String message)
Reports an error while teleporting a character to the current map.
|
boolean |
save(@NotNull MapControl<G,A,R> mapControl)
Save one map.
|
void |
saveAllMaps()
Saves all maps.
|
boolean |
saveAs(@NotNull MapControl<G,A,R> mapControl)
Asks the user for a filename, then saves the map.
|
void openFile(boolean mapFile)
mapFile - true for map files, false for script
filesboolean save(@NotNull
@NotNull MapControl<G,A,R> mapControl)
mapControl - the mapfalse if saving failed, true otherwisevoid saveAllMaps()
boolean closeAllMaps()
true if all maps closed, false if user cancelled.boolean saveAs(@NotNull
@NotNull MapControl<G,A,R> mapControl)
mapControl - the mapfalse if the user cancelled the save or if saving failed,
true otherwiseboolean confirmSaveChanges(@NotNull
@NotNull MapControl<G,A,R> mapControl)
true (and
does not ask the user) if the map is unmodified.mapControl - the mapvoid reportSaveError(@NotNull
@NotNull MapControl<G,A,R> mapControl,
@NotNull
@NotNull java.lang.String message)
mapControl - the map control that failed savingmessage - the error messagevoid reportSaveError(@NotNull
@NotNull java.io.File mapFile,
@NotNull
@NotNull java.lang.String message)
mapFile - the map file that failed savingmessage - the error messagevoid reportLoadError(@Nullable
@Nullable java.io.File file,
@NotNull
@NotNull java.lang.String message)
void reportOutOfMapBoundsDeleted(@NotNull
@NotNull java.io.File file,
int outOfMapBoundsDeleted,
@NotNull
@NotNull java.lang.StringBuilder outOfMapBoundsObjects)
void reportOutOfMemory(@NotNull
@NotNull java.io.File file)
void reportTeleportCharacterError(@NotNull
@NotNull java.lang.String mapPath,
@NotNull
@NotNull java.lang.String message)
mapPath - the map path to teleport tomessage - the error message