Serializable
, StringValue
public class LocalizableStringValue extends Object implements StringValue
Constructor | Description |
---|---|
LocalizableStringValue(Map<Object,String> lookup) |
Instantiates a LocaleStringValue which looks up localized String
representations for items in the map using the JComponent defaultLocale.
|
LocalizableStringValue(Map<Object,String> lookup,
Locale locale) |
Instantiates a LocaleStringValue which looks up localized String
representations for items in the map using the given Locale.
|
Modifier and Type | Method | Description |
---|---|---|
Locale |
getLocale() |
Returns the Locale to use for lookup, guaranteed to be not null.
|
String |
getString(Object value) |
Returns a string representation of the given value.
|
void |
setLocale(Locale locale) |
Sets the Locale to use for lookup of localized string representation.
|
public LocalizableStringValue(Map<Object,String> lookup)
lookup
- a map containing Entries of objects and a string key to
look up its string representation in the UIManagerpublic LocalizableStringValue(Map<Object,String> lookup, Locale locale)
lookup
- a map containing Entries of objects and a string key to
look up its string representation in the UIManagerlocale
- the locale to lookup the localized strings, may be null to
denote using JComponent.defaultLocalepublic String getString(Object value)
StringValue
PENDING JW: forgot - why not null return guaranteed?
getString
in interface StringValue
value
- the object to present as a stringpublic final void setLocale(Locale locale)
locale
- the locale to lookup the localized strings, may be null to
denote using Locale's default.public Locale getLocale()
Copyright © 2018. All rights reserved.