|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjpicedt.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 java.util.ResourceBundle |
resBundle
the ResourceBundle that feeds this localizer with localized Strings |
| Constructor Summary | |
|---|---|
PEActionLocalizer(java.util.ResourceBundle resBundle)
Construct a new PEActionLocalizer from the given ResourceBundle. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.ResourceBundle resBundle
| Constructor Detail |
|---|
public PEActionLocalizer(java.util.ResourceBundle resBundle)
| Method Detail |
|---|
public java.util.ResourceBundle getResourceBundle()
public java.lang.String getActionName(java.lang.String actionName)
getActionName in interface ActionLocalizerpublic java.lang.String getActionTooltip(java.lang.String actionName)
getActionTooltip in interface ActionLocalizerThis will return the value for the key build from : actionName + ".tooltip".
public java.lang.String getActionHelper(java.lang.String actionName)
getActionHelper in interface ActionLocalizerThis will return the value for the key build from : actionName + ".helper".
public java.lang.Integer getActionMnemonic(java.lang.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 javax.swing.KeyStroke getActionAccelerator(java.lang.String actionName)
getActionAccelerator in interface ActionLocalizerThis 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.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||