public static class Localizers.DialogLocalizer extends Localizers.DomainAwareLocalizer implements RegisteringLocalizer
RegisteringLocalizer
that internally maps
Dialog
objects to String
keys that are used
to fetch localized String
objects when localizing
a certain Dialog
via Dialog.setTitle(String)
.
Note: Only weak references are stored within this RegisteringLocalizer
so it is necessary to hold an external reference to a registered
Dialog
in order to make the provided localization data
persistent!domain
Constructor and Description |
---|
Localizers.DialogLocalizer(ResourceDomain domain) |
Modifier and Type | Method and Description |
---|---|
void |
localize(java.lang.Object item)
Localizes the provided
Object . |
void |
register(java.lang.Object item,
java.lang.Object data)
Stores localization data for a certain
Object . |
textString, tooltipString
public Localizers.DialogLocalizer(ResourceDomain domain)
domain
- public void localize(java.lang.Object item)
Localizer
Object
. The specific
meaning of localization
to be achieved is up
to the individual implementation.localize
in interface Localizer
item
- the Object
to localizeLocalizers
public void register(java.lang.Object item, java.lang.Object data)
RegisteringLocalizer
Object
.
The nature and meaning of the data being stored is highly
implementation specific.register
in interface RegisteringLocalizer
item
- the item that requires localizationdata
- the data to be used when localizing the given Object