Class UIManagerExt.UIDefaultsExt

  • Enclosing class:
    UIManagerExt

    private static class UIManagerExt.UIDefaultsExt
    extends java.lang.Object
    Used to replicate the resource bundle behavior from the UIDefaults.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Vector<java.lang.String> resourceBundles  
      private java.util.Map<java.util.Locale,​java.util.Map<java.lang.String,​java.lang.String>> resourceCache
      Maps from a Locale to a cached Map of the ResourceBundle.
    • Constructor Summary

      Constructors 
      Constructor Description
      UIDefaultsExt()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addResourceBundle​(java.lang.String bundleName)  
      private java.lang.Object getFromResourceBundle​(java.lang.Object key, java.util.Locale l)  
      private java.util.Map<java.lang.String,​java.lang.String> getResourceCache​(java.util.Locale l)
      Returns a Map of the known resources for the given locale.
      void removeResourceBundle​(java.lang.String bundleName)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • resourceBundles

        private java.util.Vector<java.lang.String> resourceBundles
      • resourceCache

        private java.util.Map<java.util.Locale,​java.util.Map<java.lang.String,​java.lang.String>> resourceCache
        Maps from a Locale to a cached Map of the ResourceBundle. This is done so as to avoid an exception being thrown when a value is asked for. Access to this should be done while holding a lock on the UIDefaults, eg synchronized(this).
    • Constructor Detail

      • UIDefaultsExt

        UIDefaultsExt()
    • Method Detail

      • getFromResourceBundle

        private java.lang.Object getFromResourceBundle​(java.lang.Object key,
                                                       java.util.Locale l)
      • getResourceCache

        private java.util.Map<java.lang.String,​java.lang.String> getResourceCache​(java.util.Locale l)
        Returns a Map of the known resources for the given locale.
      • addResourceBundle

        public void addResourceBundle​(java.lang.String bundleName)
      • removeResourceBundle

        public void removeResourceBundle​(java.lang.String bundleName)