org.bs.mdi
Class DefaultResources

java.lang.Object
  extended byorg.bs.mdi.Resources
      extended byorg.bs.mdi.DefaultResources

public class DefaultResources
extends Resources

Provides a default set of translation and icon resources.


Field Summary
 
Fields inherited from class org.bs.mdi.Resources
BUTTON_ICON, CUSTOM_ICON, MENU_ICON, MESSAGEBOX_ICON, TOOLBAR_ICON
 
Constructor Summary
DefaultResources()
           
 
Method Summary
 Icon getIcon(String key, int size)
          Returns an icon for the specified key and in the given size
 String getString(String key)
          Returns a localized string for the given key.
 void loadResources()
          Re-loads the resources from storage.
protected  void putIcon(String key, Icon icon, int size)
           
protected  void putMdiIcon(String key, String filename, int size)
           
 
Methods inherited from class org.bs.mdi.Resources
getLocale, getMnemonic, i18n, setLocale, stripMnemonic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResources

public DefaultResources()
Method Detail

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 key
size - 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