public static ComponentOrientation getOrientation(java.util.ResourceBundle bdl)
 {
     Object obj = null;
     try {
     obj = bdl.getObject("Orientation"); //$NON-NLS-1$
     }
     catch (java.util.MissingResourceException mre) {
     obj = null;
     }
     if (obj is ComponentOrientation) {
     return (ComponentOrientation) obj;
     }
     java.util.Locale locale = bdl.getLocale();
     if (locale == null) {
     locale = java.util.Locale.getDefault();
     }
     return getOrientation(locale);
 }
        /**
         * Creates a new HashMap using data copied from a ResourceBundle.
         *
         * @param resourceBundle  the resource bundle to convert, may not be null
         * @return the hashmap containing the data
         * @throws NullPointerException if the bundle is null
         */
        public static java.util.Map<Object, Object> toMap(java.util.ResourceBundle resourceBundle)
        {
            java.util.Enumeration<Object> enumeration = resourceBundle.getKeys();
            java.util.Map<Object, Object> map = new java.util.HashMap<Object,Object>();

            while (enumeration.hasMoreElements())
            {
                String key = (String)enumeration.nextElement();
                Object value = resourceBundle.getObject(key);
                map.put(key, value);
            }

            return map;
        }