org.bs.mdi
Class DefaultResources
java.lang.Object
org.bs.mdi.Resources
org.bs.mdi.DefaultResources
- public class DefaultResources
- extends Resources
Provides a default set of translation and icon resources.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultResources
public DefaultResources()
loadResources
public void loadResources()
- Description copied from class:
Resources
- Re-loads the resources from storage. This method should take
the currently selected locale (see
Resources.getLocale()) into account.
- Specified by:
loadResources in class Resources
putIcon
protected void putIcon(String key,
Icon icon,
int size)
putMdiIcon
protected void putMdiIcon(String key,
String filename,
int size)
getString
public String getString(String key)
- Description copied from class:
Resources
- Returns a localized string for the given key.
- Specified by:
getString in class Resources
- Parameters:
key - the key
- Returns:
- the localized string, or null in case of error
getIcon
public Icon getIcon(String key,
int size)
- Description copied from class:
Resources
- Returns an icon for the specified key and in the given size
- Specified by:
getIcon in class Resources
- Parameters:
key - the keysize - the size of the icon: pre-defined values are:
CUSTOM_ICON, MENU_ICON,
BUTTON_ICON, TOOLBAR_ICON,
MESSAGEBOX_ICON.
- Returns:
- the icon, or null in case of error