|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jpicedt.ui.action.PEActionLocalizer
public class 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)
author: Sylvain Reynal |
String |
getActionHelper(String actionName)
author: Sylvain Reynal |
Icon |
getActionIcon(String actionName)
author: Sylvain Reynal |
Integer |
getActionMnemonic(String actionName)
author: Sylvain Reynal |
String |
getActionName(String actionName)
author: Sylvain Reynal |
String |
getActionTooltip(String actionName)
author: Sylvain Reynal |
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)
ActionLocalizer
getActionName
in interface ActionLocalizer
actionName
- a non-localized action name
public String getActionTooltip(String actionName)
ActionLocalizer
getActionTooltip
in interface ActionLocalizer
This will return the value for the key build from : actionName + ".tooltip".
public String getActionHelper(String actionName)
ActionLocalizer
getActionHelper
in interface ActionLocalizer
This will return the value for the key build from : actionName + ".helper".
public Integer getActionMnemonic(String actionName)
ActionLocalizer
getActionMnemonic
in interface ActionLocalizer
This will return a Character initialized from the first character of the value associated with the key : actionName + ".mnemonic".
public KeyStroke getActionAccelerator(String actionName)
ActionLocalizer
getActionAccelerator
in interface ActionLocalizer
This will return a KeyStroke parsed from the following String: actionName + ".accelerator".
KeyStroke.getKeyStroke(String)
public Icon getActionIcon(String actionName)
ActionLocalizer
getActionIcon
in interface ActionLocalizer
This will return an ImageIcon initialized from a PNG file with path : "/jpicedt/images/"+actionName+".png"
Return null if the PNG file doesn't exist.
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |