|
JHotDraw 7.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.util.ResourceBundleUtil
public class ResourceBundleUtil
This is a convenience wrapper for accessing resources stored in a ResourceBundle.
Constructor Summary | |
---|---|
ResourceBundleUtil(java.util.ResourceBundle r)
Creates a new ResouceBundleUtil which wraps the provided resource bundle. |
Method Summary | |
---|---|
void |
configureAction(javax.swing.Action action,
java.lang.String argument)
|
void |
configureAction(javax.swing.Action action,
java.lang.String argument,
java.lang.Class baseClass)
|
void |
configureButton(javax.swing.AbstractButton button,
java.lang.String argument)
|
void |
configureButton(javax.swing.AbstractButton button,
java.lang.String argument,
java.lang.Class baseClass)
|
void |
configureMenu(javax.swing.JMenuItem menu,
java.lang.String argument)
|
void |
configureToolBarButton(javax.swing.AbstractButton button,
java.lang.String argument)
|
void |
configureToolBarButton(javax.swing.AbstractButton button,
java.lang.String argument,
java.lang.Class baseClass)
|
javax.swing.JMenuItem |
createMenuItem(javax.swing.Action a,
java.lang.String baseName)
|
javax.swing.KeyStroke |
getAcc(java.lang.String key)
Get a KeyStroke from the ResourceBundle. |
java.lang.Class |
getBaseClass()
|
java.util.ResourceBundle |
getBundle()
|
java.lang.String |
getFormatted(java.lang.String key,
java.lang.Object... arguments)
Gets a resource string formatted with MessageFormat. |
java.lang.String |
getFormatted(java.lang.String key,
java.lang.String argument)
Gets a resource string formatted with MessageFormat. |
javax.swing.ImageIcon |
getImageIcon(java.lang.String key,
java.lang.Class baseClass)
Get an image icon from the ResourceBundle. |
java.lang.Integer |
getInteger(java.lang.String key)
Get an Integer from the ResourceBundle. |
javax.swing.KeyStroke |
getKeyStroke(java.lang.String key)
Get a KeyStroke from the ResourceBundle. |
static ResourceBundleUtil |
getLAFBundle(java.lang.String baseName)
Get the appropriate ResourceBundle subclass. |
static ResourceBundleUtil |
getLAFBundle(java.lang.String baseName,
java.util.Locale locale)
Get the appropriate ResourceBundle subclass. |
char |
getMnem(java.lang.String key)
Get a Mnemonic from the ResourceBundle. |
char |
getMnemonic(java.lang.String key)
Get a Mnemonic from the ResourceBundle. |
java.lang.String |
getString(java.lang.String key)
Get a String from the ResourceBundle. |
java.lang.String |
getTip(java.lang.String key)
Get a Mnemonic from the ResourceBundle. |
void |
setBaseClass(java.lang.Class baseClass)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ResourceBundleUtil(java.util.ResourceBundle r)
Method Detail |
---|
public java.util.ResourceBundle getBundle()
public java.lang.String getString(java.lang.String key)
key
- The key of the property.
public java.lang.Integer getInteger(java.lang.String key)
key
- The key of the property.
public javax.swing.ImageIcon getImageIcon(java.lang.String key, java.lang.Class baseClass)
key
- The key of the property. This method appends ".icon" to the key.
public char getMnemonic(java.lang.String key)
key
- The key of the property.
public char getMnem(java.lang.String key)
key
- The key of the property. This method appends ".mnem" to the key.
public java.lang.String getTip(java.lang.String key)
key
- The key of the property. This method appends ".tip" to the key.
public javax.swing.KeyStroke getKeyStroke(java.lang.String key)
key
- The key of the property.
javax.swing.KeyStroke.getKeyStroke(value)
.
Returns null if the property is missing.public javax.swing.KeyStroke getAcc(java.lang.String key)
key
- The key of the property. This method adds ".acc" to the key.
javax.swing.KeyStroke.getKeyStroke(value)
.
Returns null if the property is missing.public java.lang.String getFormatted(java.lang.String key, java.lang.String argument)
key
- argument
-
public java.lang.String getFormatted(java.lang.String key, java.lang.Object... arguments)
key
- arguments
-
public static ResourceBundleUtil getLAFBundle(java.lang.String baseName) throws java.util.MissingResourceException
java.util.MissingResourceException
ResourceBundle
public void setBaseClass(java.lang.Class baseClass)
public java.lang.Class getBaseClass()
public void configureAction(javax.swing.Action action, java.lang.String argument)
public void configureAction(javax.swing.Action action, java.lang.String argument, java.lang.Class baseClass)
public void configureButton(javax.swing.AbstractButton button, java.lang.String argument)
public void configureButton(javax.swing.AbstractButton button, java.lang.String argument, java.lang.Class baseClass)
public void configureToolBarButton(javax.swing.AbstractButton button, java.lang.String argument)
public void configureToolBarButton(javax.swing.AbstractButton button, java.lang.String argument, java.lang.Class baseClass)
public void configureMenu(javax.swing.JMenuItem menu, java.lang.String argument)
public javax.swing.JMenuItem createMenuItem(javax.swing.Action a, java.lang.String baseName)
public static ResourceBundleUtil getLAFBundle(java.lang.String baseName, java.util.Locale locale) throws java.util.MissingResourceException
java.util.MissingResourceException
ResourceBundle
public java.lang.String toString()
toString
in class java.lang.Object
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |