public abstract class ResourcedAction extends javax.swing.AbstractAction implements Localizable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCELERATOR_KEY_RESOURCE
The key for accelerator resources.
|
static java.lang.String |
ACTION_COMMAND_KEY_RESOURCE
The key for action command resources.
|
(package private) static boolean |
I18N_DEBUG
Show base names on action debug?
|
protected static java.lang.String |
ICON_PREFIX
Use this as a prefix for resources of icon pathes, so they are updated automatically on locale changes.
|
static java.lang.String |
LONG_DESCRIPTION_RESOURCE
The key for long description resources.
|
static java.lang.String |
MNEMONIC_KEY_RESOURCE
The key for mnemonic resources.
|
static java.lang.String |
NAME_RESOURCE
The key for name resources.
|
static java.lang.String |
POPUP_PROPERTY
Boolean property for providing a popup menu, see
hasPopup() . |
protected static java.lang.String |
RESOURCE_PREFIX
Use this as a prefix for resources of standard names, so they are updated automatically on locale changes.
|
static java.lang.String |
SHORT_DESCRIPTION_RESOURCE
The key for short description resources.
|
static java.lang.String |
SMALL_ICON_RESOURCE
The key for small icon path resources.
|
Modifier | Constructor and Description |
---|---|
protected |
ResourcedAction(java.lang.String baseTag)
Create a resourced action with the default locale.
|
protected |
ResourcedAction(java.lang.String baseTag,
java.util.Locale l)
Create a resourced action.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
clone()
Clones the abstract action.
|
java.lang.String |
getBaseTag()
Get the basic I18n tag.
|
java.util.Locale |
getLocale()
Get the current locale of this action.
|
boolean |
hasPopup()
Does this state provide a popup menu?
|
void |
putValue(java.lang.String key,
java.lang.Object newValue)
Sets the
Value associated with the specified key. |
void |
setLocale(java.util.Locale l)
Set the locale.
|
addPropertyChangeListener, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, removePropertyChangeListener, setEnabled
static final boolean I18N_DEBUG
protected static final java.lang.String RESOURCE_PREFIX
protected static final java.lang.String ICON_PREFIX
public static final java.lang.String ACCELERATOR_KEY_RESOURCE
Action.ACCELERATOR_KEY
public static final java.lang.String ACTION_COMMAND_KEY_RESOURCE
Action.ACTION_COMMAND_KEY
public static final java.lang.String LONG_DESCRIPTION_RESOURCE
Action.LONG_DESCRIPTION
public static final java.lang.String MNEMONIC_KEY_RESOURCE
Action.MNEMONIC_KEY
public static final java.lang.String NAME_RESOURCE
Action.NAME
public static final java.lang.String SHORT_DESCRIPTION_RESOURCE
Action.SHORT_DESCRIPTION
public static final java.lang.String SMALL_ICON_RESOURCE
Action.SMALL_ICON
public static final java.lang.String POPUP_PROPERTY
hasPopup()
.protected ResourcedAction(@NotNull java.lang.String baseTag)
baseTag
- basic i18n tag.The settings of this action are tried to set by evaluating this
resource tag with one of the following suffixes:
protected ResourcedAction(@NotNull java.lang.String baseTag, @Nullable java.util.Locale l)
baseTag
- basic i18n tag.The settings of this action are tried to set by evaluating this
resource tag with one of the following suffixes:
l
- locale to use@NotNull public java.lang.String getBaseTag()
public void setLocale(java.util.Locale l)
setLocale
in interface Localizable
l
- new localepublic java.util.Locale getLocale()
getLocale
in interface Localizable
public void putValue(@NotNull java.lang.String key, java.lang.Object newValue)
Value
associated with the specified key.
This takes care of setting depending keys for localized keys.putValue
in interface javax.swing.Action
putValue
in class javax.swing.AbstractAction
key
- the String
that identifies the stored objectnewValue
- the Object
to store using this keyAction.putValue(java.lang.String, java.lang.Object)
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
Object.clone()
.clone
in class javax.swing.AbstractAction
java.lang.CloneNotSupportedException
public boolean hasPopup()
POPUP_PROPERTY