Search this API

y.option
Class ResourceBundleGuiFactory

java.lang.Object
  extended by y.option.AbstractGuiFactory
      extended by y.option.ResourceBundleGuiFactory
All Implemented Interfaces:
GuiFactory

public class ResourceBundleGuiFactory
extends AbstractGuiFactory

Simple default implementation of GuiFactory which takes the String values from a list of ResourceBundles.

 

Constructor Summary
ResourceBundleGuiFactory()
           
 
Method Summary
 void addBundle(java.util.ResourceBundle rb)
          Adds a ResourceBundle to the list of bundles that are checked for localized strings.
 void addBundle(java.lang.String baseName)
          Adds a ResourceBundle to the list of bundles that are checked for localized strings.
 java.lang.String getString(java.lang.String key)
          Localize a string.
 
Methods inherited from class y.option.AbstractGuiFactory
createButton, createHelpAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceBundleGuiFactory

public ResourceBundleGuiFactory()
Method Detail

addBundle

public void addBundle(java.lang.String baseName)
               throws java.util.MissingResourceException
Adds a ResourceBundle to the list of bundles that are checked for localized strings.
This implementation calls addBundle(ResourceBundle).

Parameters:
baseName - the base name of the resource bundle to add, a fully qualified class name
Throws:
java.util.MissingResourceException - if no resource bundle for the specified base name can be found

addBundle

public void addBundle(java.util.ResourceBundle rb)
Adds a ResourceBundle to the list of bundles that are checked for localized strings.

Parameters:
rb - the resource bundle to add

getString

public java.lang.String getString(java.lang.String key)
Localize a string.

Parameters:
key - the key
Returns:
the localized value

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.