01: /*
02: * (C) Copyright IBM Corp. 1998-2004. All Rights Reserved.
03: *
04: * The program is provided "as is" without any warranty express or
05: * implied, including the warranty of non-infringement and the implied
06: * warranties of merchantibility and fitness for a particular purpose.
07: * IBM will not be liable for any damages suffered by you as a result
08: * of using the Program. In no event will IBM be liable for any
09: * special, indirect or consequential damages or lost profits even if
10: * IBM has been advised of the possibility of their occurrence. IBM
11: * will not be liable for any third party claims against you.
12: */
13: package com.ibm.richtext.uiimpl;
14:
15: import java.util.ResourceBundle;
16: import java.util.MissingResourceException;
17:
18: import com.ibm.richtext.uiimpl.resources.FrameResources;
19: import com.ibm.richtext.uiimpl.resources.MenuData;
20:
21: public class ResourceUtils {
22:
23: static final String COPYRIGHT = "(C) Copyright IBM Corp. 1998-1999 - All Rights Reserved";
24: private static ResourceBundle BUNDLE;
25: static {
26: try {
27: BUNDLE = ResourceBundle
28: .getBundle("com.ibm.richtext.uiimpl.resources.FrameResources");
29: } catch (MissingResourceException e) {
30: System.out.println("Couldn't load resourceXXX. "
31: + "Exception: " + e);
32: BUNDLE = new FrameResources();
33: }
34: }
35:
36: public static MenuData getMenuData(String key) {
37:
38: return (MenuData) BUNDLE.getObject(key);
39: }
40:
41: public static String getResourceString(String key) {
42:
43: return BUNDLE.getString(key);
44: }
45: }
|