public class PEActionLocalizer extends java.lang.Object implements ActionLocalizer
Each method takes a unique String argument, namely the non-localized Action name used in PEAction constructor, and builds other Action's properties from this String.
If there's no associated value for this String in the associated ResourceBundle, methods catch the associated MissingResourceException and return a null value.
Modifier and Type | Field and Description |
---|---|
protected java.util.ResourceBundle |
resBundle
the ResourceBundle that feeds this localizer with localized Strings
|
Constructor and Description |
---|
PEActionLocalizer(java.util.ResourceBundle resBundle)
Construct a new PEActionLocalizer from the given ResourceBundle.
|
Modifier and Type | Method and Description |
---|---|
javax.swing.KeyStroke |
getActionAccelerator(java.lang.String actionName) |
java.lang.String |
getActionHelper(java.lang.String actionName) |
javax.swing.Icon |
getActionIcon(java.lang.String actionName) |
java.lang.Integer |
getActionMnemonic(java.lang.String actionName) |
java.lang.String |
getActionName(java.lang.String actionName) |
java.lang.String |
getActionTooltip(java.lang.String actionName) |
java.util.ResourceBundle |
getResourceBundle() |
protected java.util.ResourceBundle resBundle
public PEActionLocalizer(java.util.ResourceBundle resBundle)
public java.util.ResourceBundle getResourceBundle()
public java.lang.String getActionName(java.lang.String actionName)
getActionName
in interface ActionLocalizer
public java.lang.String getActionTooltip(java.lang.String actionName)
getActionTooltip
in interface ActionLocalizer
This will return the value for the key build from : actionName + ".tooltip".
public java.lang.String getActionHelper(java.lang.String actionName)
getActionHelper
in interface ActionLocalizer
This will return the value for the key build from : actionName + ".helper".
public java.lang.Integer getActionMnemonic(java.lang.String actionName)
getActionMnemonic
in interface ActionLocalizer
This will return a Character initialized from the first character of the value associated with the key : actionName + ".mnemonic".
public javax.swing.KeyStroke getActionAccelerator(java.lang.String actionName)
getActionAccelerator
in interface ActionLocalizer
This will return a KeyStroke parsed from the following String: actionName + ".accelerator".
KeyStroke.getKeyStroke(String)
public javax.swing.Icon getActionIcon(java.lang.String actionName)
getActionIcon
in interface ActionLocalizer
This will return an ImageIcon initialized from a GIF file with path : "/jpicedt/images/"+actionName+".gif"
Return null if the GIF file doesn't exist.
Submit a bug : syd@jpicedt.org