public interface LocaleManager extends LocaleProvider, ObservableProperty<java.util.Locale>
localizer
instance
, allowing the locale of that instance to be changed.
A locale manager is observable over changes to its locale.
ObservableValue.Change<T>
Modifier and Type | Field and Description |
---|---|
static LocaleManager |
DEFAULT_MANAGER
As returned by
getDefaultManager() . |
Modifier and Type | Method and Description |
---|---|
static LocaleManager |
getDefaultManager()
Create a locale manager based on the system default locale, as returned by
Locale.getDefault() . |
static LocaleManager |
getManager() |
static LocaleManager |
getManager(java.util.Locale locale) |
default void |
setLocale(java.util.Locale locale) |
getLocale
over, setProblem, tryGet
changes, get, getProblem, isEqual, isMatching, isValid, tryGetProblem
aggregateBackpressure, aggregateBackpressure, collect, collectBackpressure, compose, concat, concat, concatMap, dropWhile, empty, executeOn, failingValue, filter, flatMap, getNext, map, materialize, merge, merge, mergeMap, observe, observe, of, of, of, reduce, reduceBackpressure, reduceBackpressure, reduceBackpressure, repeating, requestNext, requestUnbounded, retrying, softReference, softReference, synchronize, synchronize, takeWhile, then, thenAfter, toObservable, toValue, toValue, toValue, upcast, value, weakReference, weakReference
static final LocaleManager DEFAULT_MANAGER
getDefaultManager()
.default void setLocale(java.util.Locale locale)
locale
- the new localestatic LocaleManager getManager()
static LocaleManager getManager(java.util.Locale locale)
locale
- the initial localestatic LocaleManager getDefaultManager()
Locale.getDefault()
. Changes made to this manager will be forwarded
to the system locale setting, and vice versa.
Unfortunately there is no standard mechanism to listen for changes to the
system locale, so the manager may not stay up to date until it is refreshed
by a call to setLocale(Locale)
or LocaleProvider.getLocale()
.