|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjpicedt.ui.action.PEActionLocalizer
A class that can feed PEAction's with localized properties (e.g. tooltip,...) provided by a properties file through a ResourceBundle.
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.
| Field Summary | |
protected ResourceBundle |
resBundle
the ResourceBundle that feeds this localizer with localized Strings |
| Constructor Summary | |
PEActionLocalizer(ResourceBundle resBundle)
Construct a new PEActionLocalizer from the given ResourceBundle. |
|
| Method Summary | |
KeyStroke |
getActionAccelerator(String actionName)
|
String |
getActionHelper(String actionName)
|
Icon |
getActionIcon(String actionName)
|
Integer |
getActionMnemonic(String actionName)
|
String |
getActionName(String actionName)
|
String |
getActionTooltip(String actionName)
|
ResourceBundle |
getResourceBundle()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ResourceBundle resBundle
| Constructor Detail |
public PEActionLocalizer(ResourceBundle resBundle)
| Method Detail |
public ResourceBundle getResourceBundle()
public String getActionName(String actionName)
getActionName in interface ActionLocalizerpublic String getActionTooltip(String actionName)
getActionTooltip in interface ActionLocalizerThis will return the value for the key build from : actionName + ".tooltip".
public String getActionHelper(String actionName)
getActionHelper in interface ActionLocalizerThis will return the value for the key build from : actionName + ".helper".
public Integer getActionMnemonic(String actionName)
getActionMnemonic in interface ActionLocalizerThis will return a Character initialized from the first character of the value associated with the key : actionName + ".mnemonic".
public KeyStroke getActionAccelerator(String actionName)
getActionAccelerator in interface ActionLocalizerThis will return a KeyStroke parsed from the following String: actionName + ".accelerator".
KeyStroke.getKeyStroke(String)public Icon getActionIcon(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.
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||