public class ResourceManager extends Object
| 构造器和说明 |
|---|
ResourceManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Locale |
getChoosenLocale()
Returns the current locale.
|
static ResourceBundle |
getChoosenResourceBundle()
Returns the current locale.
|
static Locale |
getDefaultLocale()
Returns the default locale.
|
static ResourceBundle |
getDefaultResourceBundle()
Returns the default resource bundle.
|
static String |
getEncodeString(String message,
boolean isEncode)
Sets the encoding String of message
|
static String |
getIconPath() |
static String |
getLanguageDependentString(String nm)
Gets a language dependent string from the resource bundle.
|
static URL |
getResource(String key)
Gets the url from a resource string.
|
static String |
getResourceString(String nm) |
static void |
recoverResourceFile() |
static void |
setChoosen(Locale loc)
Sets the new resource and locale to be used.
|
static void |
setDefault() |
static void |
setIconPath(String directoryName) |
static void |
setResourceFile(String newRsFile) |
static void |
setSystem() |
public static String getLanguageDependentString(String nm)
Resource bundle represents the property file. For example, if
property file contains something like this:
nm - name of the resource to fetch.public static URL getResource(String key)
key - the string key to the url in the properties.Class.getResource(java.lang.String)public static void setDefault()
public static void setSystem()
public static ResourceBundle getDefaultResourceBundle()
public static ResourceBundle getChoosenResourceBundle()
public static Locale getDefaultLocale()
public static Locale getChoosenLocale()
public static void setChoosen(Locale loc) throws MissingResourceException
public static String getEncodeString(String message, boolean isEncode)
message - the name of string.isEncode - is or is not ecoding..public static void setIconPath(String directoryName)
public static String getIconPath()
public static void setResourceFile(String newRsFile)
public static void recoverResourceFile()
Copyright © 2023 onecode. All rights reserved.