public class Settings
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_KEY_LANGUAGE
constants
|
static java.lang.String |
PROP_KEY_STORE_IMAGE_DIR |
Constructor and Description |
---|
Settings()
Creates the default settings.
|
Settings(java.util.Properties pProperties)
Loads the settings saved in the specified properties object.
|
Modifier and Type | Method and Description |
---|---|
LanguageProperties |
getLanguageProperties()
Convenience method to obtain the language properties.
|
java.lang.String |
getProperty(java.lang.String pProperty)
Returns the value of the specified property.
|
boolean |
needsInitialization()
Returns true, if the user has to make some first initializations of the Gui application.
|
void |
setProperty(java.lang.String pProperty,
java.lang.String pValue)
Sets the value of the specified property.
|
void |
store(java.lang.String pFileName)
Stores the current settings to a Java properties file with the specified file name.
|
public static final java.lang.String PROP_KEY_LANGUAGE
public static final java.lang.String PROP_KEY_STORE_IMAGE_DIR
public Settings()
public Settings(java.util.Properties pProperties)
pProperties
- The properties object from which the settings should be taken.public java.lang.String getProperty(java.lang.String pProperty)
pProperty
- A string indicating the name of the property.public LanguageProperties getLanguageProperties()
LanguageProperties
object holding the translations for all gui elements.public boolean needsInitialization()
public void setProperty(java.lang.String pProperty, java.lang.String pValue)
pProperty
- A string indicating the name of the property.pValue
- The value of the specified property as string.public void store(java.lang.String pFileName) throws java.lang.Exception
pFileName
- The file name of the java properties file that should be stored.java.lang.Exception
- If the file name is not defined, if there are no values to store or if the store procedure has IO exceptions.