WebObjects 5.2.3

com.webobjects.eoapplication
Class EOResourceBundle

java.lang.Object
  extended byjava.util.ResourceBundle
      extended bycom.webobjects.eoapplication.EOResourceBundle

public class EOResourceBundle
extends ResourceBundle

EOResourceBundles are registered with EOUserInterfaceParameters to localize icons and strings. EOResourceBundles search the application's bundles for all available icons (gif, jpg, jpeg, png) and string tables (plist files in Unicode) and loads the resources on demand. All string tables are merged together, so if you place multiple string tables in your frameworks and applications, all strings from all string tables will be available on the client.

User preferred language and platform information is used to find the appropriate resources/strings for the client if multiple choices are available. You create platform and language variants of resources in Xcode (which basically means that you create copies of the resources in .lproj directories with names that indicate the platform). For example you can have an icon Apple.gif in multiple variants, English.lproj/Apple.gif, English.lproj/Apple-macos.gif, German.lproj/Apple.gif, German.lproj/Apple-macos.gif and EODefaultResourceBundle will use the right version for the client by checking the user preferred languages and the platform the client is running on.

Also, if an icon is available with the same name in multiple bundles, the version in the main bundle (the application bundle itself) is preferred over a version in the frameworks. So by placing an icon "ActionIconInspect.gif" in your application, you can "override" the default inspect icon provided by the WebObjects frameworks.


Field Summary
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
EOResourceBundle()
          Default constructor.
 
Method Summary
 Enumeration getKeys()
          Returns an enumeration of all available keys registered in the resource bundle.
protected  Object handleGetObject(String key)
          Returns the localized resource (a string or an icon) which is registered with the key key in the resource bundle.
 
Methods inherited from class java.util.ResourceBundle
getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOResourceBundle

public EOResourceBundle()
Default constructor. Calls super's implementation.

Method Detail

getKeys

public Enumeration getKeys()
Returns an enumeration of all available keys registered in the resource bundle.

Returns:
an enumeration of all available keys

handleGetObject

protected Object handleGetObject(String key)
                          throws MissingResourceException
Returns the localized resource (a string or an icon) which is registered with the key key in the resource bundle. Throws a MissingResourceException if the resource is not found.

Parameters:
key - the key to look up
Returns:
the localized resource
Throws:
MissingResourceException

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.