de.caff.maze
Class NullSystemAccess
java.lang.Object
de.caff.maze.TemporaryDataStorage
de.caff.maze.NullSystemAccess
- All Implemented Interfaces:
- DataStorage, SystemAccess
class NullSystemAccess
- extends TemporaryDataStorage
- implements SystemAccess
A minimalist system access which does not actually access the system.
Persistent data is only stored for the given session.
-
Methods inherited from class de.caff.maze.TemporaryDataStorage |
getBoolean, getColor, getDouble, getInt, getLong, getString, hasKey, setBoolean, setColor, setDouble, setInt, setLong, setString, storePersistentData |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.caff.maze.DataStorage |
getBoolean, getColor, getDouble, getInt, getLong, getString, hasKey, setBoolean, setColor, setDouble, setInt, setLong, setString, storePersistentData |
NullSystemAccess
NullSystemAccess()
print
public boolean print(java.awt.print.Printable printable)
- Print the given printable.
- Specified by:
print
in interface SystemAccess
- Parameters:
printable
- printable to be printed
- Returns:
true
: printing was successful,
false
: printing failed or was canceled
getUserFileContent
public byte[] getUserFileContent(SystemAccess.FileType filetype)
throws java.io.IOException
- Get the contents of a user selected file.
- Specified by:
getUserFileContent
in interface SystemAccess
- Throws:
java.io.IOException
- on errors during file access- Parameters:
filetype
- type of file to be used
- Returns:
- byte array or
null
if the user canceled the operation
saveUserFileContent
public boolean saveUserFileContent(byte[] content,
SystemAccess.FileType filetype)
throws java.io.IOException
- Save a byte array into a user selected file.
- Specified by:
saveUserFileContent
in interface SystemAccess
- Throws:
java.io.IOException
- on errors during file access- Parameters:
content
- the content of the filefiletype
- type of file to be used
- Returns:
true
if the user saved the file, false
otherwise
setMainFrame
public void setMainFrame(javax.swing.JFrame frame)
- Sets the main frame of the application.
This is useful for centering dialogs.
- Specified by:
setMainFrame
in interface SystemAccess
- Parameters:
frame
- application's main frame