|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.jdic.screensaver.ScreensaverSettings
public class ScreensaverSettings
Holds the currently active settings for a screensaver. Assists in persisting the settings if the underlying platform specific screensaver APIs do not do this for you (e.g. on Windows). The settings are saved to the user's home directory under .saverbeans/screensaver.properties. In order for this class to work properly, the configuration file must use '-' before each option. Boolean options must be of the form '-option' and value options must be of the form '-option value'.
Constructor Summary | |
---|---|
ScreensaverSettings()
|
Method Summary | |
---|---|
java.lang.String |
getNormalizedCommandline()
Returns these settings as a normalized commandline. |
java.lang.String |
getProperty(java.lang.String key)
Gets a property for this screensaver. |
void |
loadFromCommandline(java.lang.String loadedSettingsParam)
Load the current settings from the given normalized commandline |
void |
loadSettings(java.lang.String screensaverName)
Loads the currently selected settings from the user's home directory. |
void |
saveSettings(java.lang.String screensaverName)
Saves the currently selected settings in the user's home directory. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets a property for this screensaver. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScreensaverSettings()
Method Detail |
---|
public void setProperty(java.lang.String key, java.lang.String value)
key
- The key of the propertyvalue
- The value of the propertypublic java.lang.String getProperty(java.lang.String key)
key
- The key to retrieve the value for
public java.lang.String getNormalizedCommandline()
public void saveSettings(java.lang.String screensaverName)
screensaverName
- The key to store the settings under in the
properties file.public void loadSettings(java.lang.String screensaverName)
screensaverName
- The key to load the settings from in the
properties file.public void loadFromCommandline(java.lang.String loadedSettingsParam)
loadedSettingsParam
- The settings to be loaded, in normalized
commandline form.getNormalizedCommandline()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |