public interface DMXResourceManager
Modifier and Type | Method and Description |
---|---|
void |
addLocaleChangeObserver(Observer observer)
Add observer which will be notified when locale is changed.
|
void |
addSupportedLocale(Locale locale)
Adds new locale to a list of supported locales.
|
void |
clearSupportedLocales()
Removes all supported locales from this resource manager.
|
Locale |
getCurrentLocale()
Returns application's current locale.
|
<T extends DMXResourceHandler> |
getResourceHandler(ResourceHandlerType type)
Returns resource handler implementation associated with this instance of resource manager.
|
Locale[] |
getSupportedLocales()
Returns the
Locale s supported by the application. |
void |
registerCallbackResources(DMXExtensionCallback callback)
Registers resources specified in extension callback.
|
void |
setCurrentLocale(Locale locale)
Sets current locale to be used in application.
|
void |
setSupportedLocales(Locale[] locales)
Sets locales that applications supports.
|
void setCurrentLocale(Locale locale)
Sets current locale to be used in application. If supplied argument is null
,
a IllegalArgumentException
will be thrown.
Setting new Locale
will cause all loaded bundles for previous Locale
to be unloaded,
and then reloaded for newly set Locale
.
locale
- locale to setLocale getCurrentLocale()
Locale
is specifically
set, this method will return JVM default locale.void setSupportedLocales(Locale[] locales)
null
or empty,
an IllegalArgumentException
is thrown.locales
- array of supported localesLocale[] getSupportedLocales()
Locale
s supported by the application. If no locales are explicitly added,
this method returns an array with only JVM default locale.Locale
svoid addSupportedLocale(Locale locale)
null
,
an IllegalArgumentException
is thrown.locale
- locale to addvoid clearSupportedLocales()
<T extends DMXResourceHandler> T getResourceHandler(ResourceHandlerType type)
T
- type of resource handlertype
- requested type of resource handlervoid addLocaleChangeObserver(Observer observer)
observer
- observer to be notifiedvoid registerCallbackResources(DMXExtensionCallback callback)
callback
- extension callbackCopyright © 2012-2014 Vektor Software. All Rights Reserved.