Gridarta Editor
net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R > Interface Template Reference
+ Inheritance diagram for net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >:
+ Collaboration diagram for net.sf.gridarta.model.mapmanager.FileControl< 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 MapControl< G, A, R > mapControl)
 Asks the user whether to save changes of a map. More...
 
void openFile (boolean mapFile)
 The user wants to edit a file. More...
 
void reportLoadError (@Nullable File file, @NotNull String message)
 
void reportOutOfMapBoundsDeleted (@NotNull File file, int outOfMapBoundsDeleted, @NotNull StringBuilder outOfMapBoundsObjects)
 
void reportOutOfMemory (@NotNull File file)
 
void reportSaveError (@NotNull MapControl< G, A, R > mapControl, @NotNull String message)
 Reports an error while saving a map file to the user. More...
 
void reportSaveError (@NotNull File mapFile, @NotNull String message)
 Reports an error while saving a map file to the user. More...
 
void reportTeleportCharacterError (@NotNull String mapPath, @NotNull String message)
 Reports an error while teleporting a character to the current map. More...
 
boolean save (@NotNull MapControl< G, A, R > mapControl)
 Save one map. More...
 
void saveAllMaps ()
 Saves all maps. More...
 
boolean saveAs (@NotNull MapControl< G, A, R > mapControl)
 Asks the user for a filename, then saves the map. More...
 

Detailed Description

Definition at line 30 of file FileControl.java.

Member Function Documentation

◆ closeAllMaps()

boolean net.sf.gridarta.model.mapmanager.FileControl< 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.

Returns
true
if all maps closed,
false
if user cancelled.

Implemented in net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.

Referenced by net.sf.gridarta.action.ExitAction.canExit().

+ Here is the caller graph for this function:

◆ confirmSaveChanges()

boolean net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.confirmSaveChanges ( @NotNull MapControl< G, A, R >  mapControl)

Asks the user whether to save changes of a map.

Returns

true

(and does not ask the user) if the map is unmodified.

Parameters
mapControlthe map
Returns
whether closing the map is allowed

Implemented in net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.

Referenced by net.sf.gridarta.gui.map.mapview.MapViewsManager<?, ?, ?>.closeMapView().

+ Here is the caller graph for this function:

◆ openFile()

void net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.openFile ( boolean  mapFile)

◆ reportLoadError()

◆ reportOutOfMapBoundsDeleted()

void net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reportOutOfMapBoundsDeleted ( @NotNull File  file,
int  outOfMapBoundsDeleted,
@NotNull StringBuilder  outOfMapBoundsObjects 
)

◆ reportOutOfMemory()

◆ reportSaveError() [1/2]

void net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reportSaveError ( @NotNull MapControl< G, A, R >  mapControl,
@NotNull String  message 
)

Reports an error while saving a map file to the user.

Parameters
mapControlthe map control that failed saving
messagethe error message

Implemented in net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.

Referenced by net.sf.gridarta.actions.ExitConnectorActions< G, A, R >.doExitConnect().

+ Here is the caller graph for this function:

◆ reportSaveError() [2/2]

void net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reportSaveError ( @NotNull File  mapFile,
@NotNull String  message 
)

Reports an error while saving a map file to the user.

Parameters
mapFilethe map file that failed saving
messagethe error message

Implemented in net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.

◆ reportTeleportCharacterError()

void net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.reportTeleportCharacterError ( @NotNull String  mapPath,
@NotNull String  message 
)

Reports an error while teleporting a character to the current map.

Parameters
mapPaththe map path to teleport to
messagethe error message

Implemented in net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.

Referenced by net.sf.gridarta.actions.AbstractServerActions< GameObject, MapArchObject, Archetype >.doOpenInClient().

+ Here is the caller graph for this function:

◆ save()

◆ saveAllMaps()

◆ saveAs()

boolean net.sf.gridarta.model.mapmanager.FileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.saveAs ( @NotNull MapControl< G, A, R >  mapControl)

Asks the user for a filename, then saves the map.

Parameters
mapControlthe map
Returns
false
if the user cancelled the save or if saving failed,
true
otherwise

Implemented in net.sf.gridarta.gui.misc.DefaultFileControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.

Referenced by net.sf.gridarta.gui.map.MapFileActions< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.doSaveMapAs().

+ Here is the caller graph for this function:

The documentation for this interface was generated from the following file: