public class SuperGlobal
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BUNDLE_NAME_DE |
static java.lang.String |
BUNDLE_NAME_DK |
static java.lang.String |
BUNDLE_NAME_EN |
static java.lang.String |
BUNDLE_NAME_ES |
static java.lang.String |
BUNDLE_NAME_FR |
static java.lang.String |
BUNDLE_NAME_IT |
static java.lang.String |
BUNDLE_NAME_NL |
static java.lang.String |
BUNDLE_NAME_TR |
static java.lang.String |
BUNDLE_NAME_ZH |
static java.util.Locale |
DENMARK |
static java.util.Locale |
NETHERLANDS |
protected java.util.HashMap<java.lang.Integer,java.util.ResourceBundle> |
resourceBundles |
static java.util.Locale |
SPAIN |
static java.util.Locale |
TURKEY |
Constructor and Description |
---|
SuperGlobal() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getHomeDir()
Returns user's home directory with real check of canWrite().
|
java.lang.String |
getResourceString(java.lang.String resourceKey,
int language)
Returns the framework resource string for the specified key, translated for the specified language.
|
java.lang.String |
getResourceString(java.lang.String resourceKey,
java.util.Locale locale)
Returns the framework resource string for the specified key, translated for the specified locale.
|
protected java.lang.String |
getSoundDirectory() |
static SuperGlobal |
getSuperInstance()
Returns the singleton instance of SuperGlobal.
|
static java.lang.String |
getUserTempDir() |
static java.lang.String |
getWorkingDir()
Returns applications working directory - if Java user.dir returns subdirectory bin, the parent directory is returned.
|
static java.lang.String |
getWorkingDirAbsolutPath() |
void |
playSound(java.lang.String soundFileName) |
void |
playSound(java.lang.String soundFileName,
int decibelReducing) |
void |
playSound(java.net.URL soundURL,
int decibelReducing) |
static void |
setHomeDir(java.lang.String specialHomeDir)
Sets a special home directory which differs from System.getProperty("user.home")
|
public static final java.util.Locale NETHERLANDS
public static final java.util.Locale SPAIN
public static final java.util.Locale TURKEY
public static final java.util.Locale DENMARK
public static final java.lang.String BUNDLE_NAME_EN
public static final java.lang.String BUNDLE_NAME_DE
public static final java.lang.String BUNDLE_NAME_DK
public static final java.lang.String BUNDLE_NAME_ES
public static final java.lang.String BUNDLE_NAME_FR
public static final java.lang.String BUNDLE_NAME_IT
public static final java.lang.String BUNDLE_NAME_NL
public static final java.lang.String BUNDLE_NAME_TR
public static final java.lang.String BUNDLE_NAME_ZH
protected java.util.HashMap<java.lang.Integer,java.util.ResourceBundle> resourceBundles
public static SuperGlobal getSuperInstance()
public static void setHomeDir(java.lang.String specialHomeDir)
specialHomeDir
- the special home directory to setpublic static java.lang.String getHomeDir()
public static java.lang.String getUserTempDir()
public static java.lang.String getWorkingDir()
public static java.lang.String getWorkingDirAbsolutPath()
public void playSound(java.lang.String soundFileName)
public void playSound(java.lang.String soundFileName, int decibelReducing)
public void playSound(java.net.URL soundURL, int decibelReducing)
protected java.lang.String getSoundDirectory()
public java.lang.String getResourceString(java.lang.String resourceKey, java.util.Locale locale)
resourceKey
- the key of the text resourcelocale
- the locale to translate topublic java.lang.String getResourceString(java.lang.String resourceKey, int language)
resourceKey
- the key of the text resourcelanguage
- the language to translate toCopyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de