public static UIDefaults getUIDefaultsOfClass(String className) {
      UIDefaults retVal = new UIDefaults();
      UIDefaults defaults = UIManager.getLookAndFeelDefaults();
      List<?> listKeys = Collections.list(defaults.keys());
      for (Object key : listKeys) {
         if (key instanceof String && ((String) key).startsWith(className)) {
            String stringKey = (String) key;
            String property = stringKey;
            if (stringKey.contains(".")) {
               property = stringKey.substring(stringKey.indexOf(".") + 1);
            }
            retVal.put(property, defaults.get(key));
         }
      }
      return retVal;
   }
public static UIDefaults getUIDefaultsOfClass(String className) {
      UIDefaults retVal = new UIDefaults();
      UIDefaults defaults = UIManager.getLookAndFeelDefaults();
      List<?> listKeys = Collections.list(defaults.keys());
      for (Object key : listKeys) {
         if (key instanceof String && ((String) key).startsWith(className)) {
            String stringKey = (String) key;
            String property = stringKey;
            if (stringKey.contains(".")) {
               property = stringKey.substring(stringKey.indexOf(".") + 1);
            }
            retVal.put(property, defaults.get(key));
         }
      }
      return retVal;
   }
public static UIDefaults getUIDefaultsOfClass ( String className ) { UIDefaults retVal = new UIDefaults ( ) ; UIDefaults defaults = UIManager . getLookAndFeelDefaults ( ) ; List < ? > listKeys = Collections . list ( defaults . keys ( ) ) ; for ( Object key : listKeys ) { if ( key instanceof String && ( ( String ) key ) . startsWith ( className ) ) { String stringKey = ( String ) key ; String property = stringKey ; if ( stringKey . contains ( "." ) ) { property = stringKey . substring ( stringKey . indexOf ( "." ) + 1 ) ; } retVal . put ( property , defaults . get ( key ) ) ; } } return retVal ; }
Convenience method for retrieving a subset of the UIDefaults pertaining
to a particular class.

@param className fully qualified name of the class of interest
@return the UIDefaults of the class named
Convenience method for retrieving a subset of the UIDefaults pertaining to a particular class .