|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.caff.maze.ApplicationSystemAccess
class ApplicationSystemAccess
System access if running as an application.
![]() |
![]() |
![]() |
![]() |
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface de.caff.maze.SystemAccess |
---|
SystemAccess.FileType |
Field Summary | |
---|---|
static java.lang.String |
RESOURCE_MAZE_FILTER_DESCRIPTION
Shortcut for mazeFilterDescription i18n resource key. |
Fields inherited from interface de.caff.maze.SystemAccess |
---|
IMAGE_FILE_TYPE, MAZE_FILE_TYPE |
Constructor Summary | |
---|---|
ApplicationSystemAccess()
Constructor. |
Method Summary | |
---|---|
boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
Get a persistent boolean value. |
java.awt.Color |
getColor(java.lang.String key,
java.awt.Color defaultValue)
Get a persistent color value. |
double |
getDouble(java.lang.String key,
double defaultValue)
Get a persistent double value. |
int |
getInt(java.lang.String key,
int defaultValue)
Get a persistent integer value. |
long |
getLong(java.lang.String key,
long defaultValue)
Get a persistent long integer value. |
java.lang.String |
getString(java.lang.String key,
java.lang.String defaultValue)
Get a persistent string value. |
byte[] |
getUserFileContent(SystemAccess.FileType filetype)
Get the contents of a user selected file. |
boolean |
hasKey(java.lang.String key)
Is his key defined? |
boolean |
print(java.awt.print.Printable printable)
Print the given printable. |
boolean |
saveUserFileContent(byte[] content,
SystemAccess.FileType filetype)
Save a byte array into a user selected file. |
void |
setBoolean(java.lang.String key,
boolean value)
Set a persistent boolean. |
void |
setColor(java.lang.String key,
java.awt.Color value)
Set a persistent color. |
void |
setDouble(java.lang.String key,
double value)
Set a persistent double value. |
void |
setInt(java.lang.String key,
int value)
Set a persistent integer value. |
void |
setLong(java.lang.String key,
long value)
Set a persistent long integer value. |
void |
setMainFrame(javax.swing.JFrame frame)
Sets the main frame of the application. |
void |
setString(java.lang.String key,
java.lang.String value)
Set a persistent string. |
void |
storePersistentData()
Store all persistent data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RESOURCE_MAZE_FILTER_DESCRIPTION
Constructor Detail |
---|
public ApplicationSystemAccess()
Method Detail |
---|
public boolean print(java.awt.print.Printable printable)
print
in interface SystemAccess
printable
- printable to be printed
true
: printing was successful,
false
: printing failed or was canceledpublic java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
getString
in interface DataStorage
key
- key for the stringdefaultValue
- default value which is returned if the string is not defined
public void setString(java.lang.String key, java.lang.String value)
setString
in interface DataStorage
key
- key for the stringvalue
- the string value to storepublic boolean getBoolean(java.lang.String key, boolean defaultValue)
getBoolean
in interface DataStorage
key
- the key of the valuedefaultValue
- the default value if the key is not defined
public void setBoolean(java.lang.String key, boolean value)
setBoolean
in interface DataStorage
key
- key for the booleanvalue
- value of the booleanpublic java.awt.Color getColor(java.lang.String key, java.awt.Color defaultValue)
getColor
in interface DataStorage
key
- the key of the valuedefaultValue
- the default value if the key is not defined
public void setColor(java.lang.String key, java.awt.Color value)
setColor
in interface DataStorage
key
- key for the colorvalue
- value of the colorpublic int getInt(java.lang.String key, int defaultValue)
getInt
in interface DataStorage
key
- the key of the valuedefaultValue
- the default value if the key is not defined
public void setInt(java.lang.String key, int value)
setInt
in interface DataStorage
key
- key for the intvalue
- value of the intpublic long getLong(java.lang.String key, long defaultValue)
getLong
in interface DataStorage
key
- the key of the valuedefaultValue
- the default value if the key is not defined
public void setLong(java.lang.String key, long value)
setLong
in interface DataStorage
key
- key for the long intvalue
- value of the long intpublic double getDouble(java.lang.String key, double defaultValue)
getDouble
in interface DataStorage
key
- the key of the valuedefaultValue
- the default value if the key is not defined
public void setDouble(java.lang.String key, double value)
setDouble
in interface DataStorage
key
- key for the intvalue
- value of the intpublic boolean hasKey(java.lang.String key)
hasKey
in interface DataStorage
key
- key to look for
true
if the key is defined, false
otherwisepublic void storePersistentData()
storePersistentData
in interface DataStorage
public byte[] getUserFileContent(SystemAccess.FileType filetype) throws java.io.IOException
getUserFileContent
in interface SystemAccess
java.io.IOException
- on errors during file accessfiletype
- type of file to be used
null
if the user canceled the operationpublic boolean saveUserFileContent(byte[] content, SystemAccess.FileType filetype) throws java.io.IOException
saveUserFileContent
in interface SystemAccess
java.io.IOException
- on errors during file accesscontent
- the content of the filefiletype
- type of file to be used
true
if the user saved the file, false
otherwisepublic void setMainFrame(javax.swing.JFrame frame)
setMainFrame
in interface SystemAccess
frame
- application's main frame
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |