コード例 #1
0
ファイル: NimbusLookAndFeel.java プロジェクト: ronshapiro/j86
 Map<String, Object> getDefaultsForPrefix(String prefix) {
   if (compiledDefaults == null) {
     compiledDefaults = new HashMap<String, Map<String, Object>>();
     for (Map.Entry<Object, Object> entry : UIManager.getDefaults().entrySet()) {
       if (entry.getKey() instanceof String) {
         addDefault((String) entry.getKey(), entry.getValue());
       }
     }
     if (!defaultListenerAdded) {
       UIManager.getDefaults().addPropertyChangeListener(defaultsListener);
       defaultListenerAdded = true;
     }
   }
   return compiledDefaults.get(prefix);
 }
コード例 #2
0
 /**
  * Check if developer changed icon in the UI table.
  *
  * @return the icon to use or {@code null} if the current one is to be used
  */
 private Icon getLaFIcon() {
   // use icon from the UI table if it does not match this one.
   Icon rv = (Icon) UIManager.getDefaults().get(typeToString(type));
   if (rv instanceof VistaMenuItemCheckIcon && ((VistaMenuItemCheckIcon) rv).type == type) {
     rv = null;
   }
   return rv;
 }
コード例 #3
0
ファイル: NimbusLookAndFeel.java プロジェクト: ronshapiro/j86
 /** Called by UIManager when this look and feel is uninstalled. */
 @Override
 public void uninitialize() {
   super.uninitialize();
   defaults.uninitialize();
   // clear all cached images to free memory
   ImageCache.getInstance().flush();
   UIManager.getDefaults().removePropertyChangeListener(defaultsListener);
 }