public static class Localizers.PopupLocalizer extends Localizers.DomainAwareLocalizer
Localizer
that localizes objects of type
JPopupMenu
using the JPopupMenu.setLabel(String)
and JComponent.setToolTipText(String)
methods.
Keys for both the text
and tooltip
String
s are obtained from the components
JComponent.getClientProperty(Object)
with
ResourceConstants.DEFAULT_TEXT_KEY
and
ResourceConstants.DEFAULT_DESCRIPTION_KEY
as keys.JComponent.putClientProperty(Object, Object)
,
JPopupMenu.setLabel(String)
,
JComponent.setToolTipText(String)
domain
Constructor and Description |
---|
Localizers.PopupLocalizer(ResourceDomain domain) |
Modifier and Type | Method and Description |
---|---|
void |
localize(java.lang.Object item)
Localizes the provided
Object . |
textString, tooltipString
public Localizers.PopupLocalizer(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.item
- the Object
to localizeLocalizers