Gridarta Editor
net.sf.gridarta.model.mapmanager.TestFileControl Class Reference

A FileControl implementation for testing purposes. More...

+ Inheritance diagram for net.sf.gridarta.model.mapmanager.TestFileControl:
+ Collaboration diagram for net.sf.gridarta.model.mapmanager.TestFileControl:

Public Member Functions

boolean closeAllMaps ()
 
boolean confirmSaveChanges (@NotNull final MapControl< TestGameObject, TestMapArchObject, TestArchetype > mapControl)
 
void openFile (final boolean mapFile)
 
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< TestGameObject, TestMapArchObject, TestArchetype > mapControl, @NotNull final String message)
 
void reportSaveError (@NotNull final File mapFile, @NotNull final String message)
 
void reportTeleportCharacterError (@NotNull final String mapPath, @NotNull final String message)
 
boolean save (@NotNull final MapControl< TestGameObject, TestMapArchObject, TestArchetype > mapControl)
 
void saveAllMaps ()
 
boolean saveAs (@NotNull final MapControl< TestGameObject, TestMapArchObject, TestArchetype > mapControl)
 
String toString ()
 
- Public Member Functions inherited from net.sf.gridarta.model.mapmanager.FileControl< TestGameObject, TestMapArchObject, TestArchetype >
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...
 

Private Attributes

final StringBuilder sb = new StringBuilder()
 Collects the performed actions. More...
 

Detailed Description

A FileControl implementation for testing purposes.

Author
Andreas Kirschbaum

Definition at line 34 of file TestFileControl.java.

Member Function Documentation

◆ closeAllMaps()

boolean net.sf.gridarta.model.mapmanager.TestFileControl.closeAllMaps ( )

Definition at line 58 of file TestFileControl.java.

◆ confirmSaveChanges()

boolean net.sf.gridarta.model.mapmanager.TestFileControl.confirmSaveChanges ( @NotNull final MapControl< TestGameObject, TestMapArchObject, TestArchetype mapControl)

Definition at line 68 of file TestFileControl.java.

◆ openFile()

void net.sf.gridarta.model.mapmanager.TestFileControl.openFile ( final boolean  mapFile)

Definition at line 43 of file TestFileControl.java.

◆ reportLoadError()

void net.sf.gridarta.model.mapmanager.TestFileControl.reportLoadError ( @Nullable final File  file,
@NotNull final String  message 
)

Definition at line 87 of file TestFileControl.java.

◆ reportOutOfMapBoundsDeleted()

void net.sf.gridarta.model.mapmanager.TestFileControl.reportOutOfMapBoundsDeleted ( @NotNull final File  file,
final int  outOfMapBoundsDeleted,
@NotNull final StringBuilder  outOfMapBoundsObjects 
)

Definition at line 92 of file TestFileControl.java.

◆ reportOutOfMemory()

void net.sf.gridarta.model.mapmanager.TestFileControl.reportOutOfMemory ( @NotNull final File  file)

Definition at line 97 of file TestFileControl.java.

◆ reportSaveError() [1/2]

void net.sf.gridarta.model.mapmanager.TestFileControl.reportSaveError ( @NotNull final MapControl< TestGameObject, TestMapArchObject, TestArchetype mapControl,
@NotNull final String  message 
)

Definition at line 73 of file TestFileControl.java.

◆ reportSaveError() [2/2]

void net.sf.gridarta.model.mapmanager.TestFileControl.reportSaveError ( @NotNull final File  mapFile,
@NotNull final String  message 
)

Definition at line 78 of file TestFileControl.java.

◆ reportTeleportCharacterError()

void net.sf.gridarta.model.mapmanager.TestFileControl.reportTeleportCharacterError ( @NotNull final String  mapPath,
@NotNull final String  message 
)

Definition at line 102 of file TestFileControl.java.

◆ save()

boolean net.sf.gridarta.model.mapmanager.TestFileControl.save ( @NotNull final MapControl< TestGameObject, TestMapArchObject, TestArchetype mapControl)

Definition at line 48 of file TestFileControl.java.

◆ saveAllMaps()

void net.sf.gridarta.model.mapmanager.TestFileControl.saveAllMaps ( )

Definition at line 53 of file TestFileControl.java.

◆ saveAs()

boolean net.sf.gridarta.model.mapmanager.TestFileControl.saveAs ( @NotNull final MapControl< TestGameObject, TestMapArchObject, TestArchetype mapControl)

Definition at line 63 of file TestFileControl.java.

◆ toString()

String net.sf.gridarta.model.mapmanager.TestFileControl.toString ( )

Definition at line 107 of file TestFileControl.java.

Member Data Documentation

◆ sb

final StringBuilder net.sf.gridarta.model.mapmanager.TestFileControl.sb = new StringBuilder()
private

Collects the performed actions.

Definition at line 40 of file TestFileControl.java.


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