src/main/java/com/spinyowl/legui/theme/DefaultThemeManager.java
protected <C, R> R cycledSearch(Class<C> componentClass, Map map, R defaultComponentTheme) {
    R componentTheme = null;
    Class cClass = componentClass;
    while (componentTheme == null) {
      componentTheme = ((Map<Class<C>, R>) map).get(cClass);
      if (cClass.isAssignableFrom(Component.class)) {
        break;
      }
      cClass = cClass.getSuperclass();
    }
    if (componentTheme == null) {
      componentTheme = defaultComponentTheme;
    }
    return componentTheme;
  }
/** Used to search through class hierarcjy for appropriate theme. */
Used to search through class hierarcjy for appropriate theme.
Used to search through class hierarcjy for appropriate theme .
protected <C, R> R cycledSearch(Class<C> componentClass, Map map, R defaultComponentTheme) {
    R componentTheme = null;
    Class cClass = componentClass;
    while (componentTheme == null) {
      componentTheme = ((Map<Class<C>, R>) map).get(cClass);
      if (cClass.isAssignableFrom(Component.class)) {
        break;
      }
      cClass = cClass.getSuperclass();
    }
    if (componentTheme == null) {
      componentTheme = defaultComponentTheme;
    }
    return componentTheme;
  }
protected < C , R > R cycledSearch ( Class < C > componentClass , Map map , R defaultComponentTheme ) { R componentTheme = null ; Class cClass = componentClass ; while ( componentTheme == null ) { componentTheme = ( ( Map < Class < C > , R > ) map ) . get ( cClass ) ; if ( cClass . isAssignableFrom ( Component . class ) ) { break ; } cClass = cClass . getSuperclass ( ) ; } if ( componentTheme == null ) { componentTheme = defaultComponentTheme ; } return componentTheme ; }
Used to search through class hierarcjy for appropriate theme.
Used to search through class hierarcjy for appropriate theme .