es.prodevelop.gvsig.mobile.settings
Class AppSettings

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.settings.AppSettings

public class AppSettings
extends java.lang.Object

This class keeps static information about the application settings (serializes/deserializes the persistence file)

Author:
jldominguez
See Also:
GvsigMobileApp

Field Summary
static java.lang.String AMPERSAND_REPLACED
          Utility String used to store without problems WMS URLs that have ampersands
static java.io.File APP_SETTINGS_PERSISTENCE_FILE
          The name of the persistence file
static java.io.File APP_SETTINGS_PERSISTENCE_FOLDER
          The folder where the persistence file is stored
static java.awt.geom.Rectangle2D defaultBBox
          The default initial bounding box used by the application
static java.awt.Color defaultBgColor
          The default background color used by the application
static java.lang.String defaultLocaleLanguage
          The default locale (language) used by the application
static java.io.File defaultProject
          The defauñt project opened by application at startup
static java.io.File defaultSavePath
          The default project path used by the application
static java.lang.String defaultSRS
          The default SRS used by the application
static java.lang.String localeLanguage
          The current locale (language) used by the application
static java.lang.String tracklogSuffix
          The default suffix used by the application for tracklog files (GPS functionality)
static boolean useDefaultProject
          The default value for whether a default startup project is declarted
static java.lang.String waypointsSuffix
          The current suffix used by the application for tracklog files (GPS functionality)
static int WMS_SERVERS_PERSISTED_MAX_COUNT
          Max. number of WMS servers to be stored in the persistence file.
static java.lang.String[] wmsServers
          The WMS servers added to the WMS combo box
 
Constructor Summary
AppSettings()
           
 
Method Summary
static java.lang.String[] getAvailableLanguages()
          Gets an array with the available locales
static boolean isAvailableLocale(java.lang.String loc)
          Utility method to find out if a particular locale (language) is available in the current installation-
static void load()
          Loads the persistence file into this object.
static void store()
          Stores the current application settings into the persistence file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultSRS

public static java.lang.String defaultSRS
The default SRS used by the application


defaultBBox

public static java.awt.geom.Rectangle2D defaultBBox
The default initial bounding box used by the application


defaultSavePath

public static java.io.File defaultSavePath
The default project path used by the application


defaultBgColor

public static java.awt.Color defaultBgColor
The default background color used by the application


tracklogSuffix

public static java.lang.String tracklogSuffix
The default suffix used by the application for tracklog files (GPS functionality)


waypointsSuffix

public static java.lang.String waypointsSuffix
The current suffix used by the application for tracklog files (GPS functionality)


localeLanguage

public static java.lang.String localeLanguage
The current locale (language) used by the application


defaultLocaleLanguage

public static java.lang.String defaultLocaleLanguage
The default locale (language) used by the application


useDefaultProject

public static boolean useDefaultProject
The default value for whether a default startup project is declarted


defaultProject

public static java.io.File defaultProject
The defauñt project opened by application at startup


wmsServers

public static java.lang.String[] wmsServers
The WMS servers added to the WMS combo box


AMPERSAND_REPLACED

public static final java.lang.String AMPERSAND_REPLACED
Utility String used to store without problems WMS URLs that have ampersands

See Also:
Constant Field Values

WMS_SERVERS_PERSISTED_MAX_COUNT

public static final int WMS_SERVERS_PERSISTED_MAX_COUNT
Max. number of WMS servers to be stored in the persistence file.

See Also:
Constant Field Values

APP_SETTINGS_PERSISTENCE_FILE

public static final java.io.File APP_SETTINGS_PERSISTENCE_FILE
The name of the persistence file


APP_SETTINGS_PERSISTENCE_FOLDER

public static final java.io.File APP_SETTINGS_PERSISTENCE_FOLDER
The folder where the persistence file is stored

Constructor Detail

AppSettings

public AppSettings()
Method Detail

load

public static void load()
                 throws GvsigMobileException
Loads the persistence file into this object.

Throws:
GvsigMobileException

store

public static void store()
                  throws GvsigMobileException
Stores the current application settings into the persistence file.

Throws:
GvsigMobileException

isAvailableLocale

public static boolean isAvailableLocale(java.lang.String loc)
Utility method to find out if a particular locale (language) is available in the current installation-

Parameters:
loc - the locale of interest
Returns:
whether a particular locale (language) is available

getAvailableLanguages

public static java.lang.String[] getAvailableLanguages()
Gets an array with the available locales

Returns:
an array with the available locales