src/main/java/com/spinyowl/legui/component/misc/listener/component/TabKeyEventListener.java
private Component findPrevInChildComponents(List<Component> childComponents, Component previous) {
    Component previousComponent = previous;
    childComponents.sort(comparator);
    Collections.reverse(childComponents);
    for (Component child : childComponents) {
      if (!child.isVisible()) {
        continue;
      }
      if (!child.isEmpty()) {
        Component cprev = findPrevInChildComponents(child.getChildComponents(), previousComponent);
        if (previousComponent != cprev) {
          return cprev;
        }
      } else if (isFF(child)) {
        return child;
      }
    }

    return previousComponent;
  }
/**
   * Used to find previous component in child components.
   *
   * @param childComponents child components.
   * @param previous        current previous component.
   * @return previous component.
   */
Used to find previous component in child components.
@param childComponents child components.
@param previous        current previous component.
@return previous component.
Used to find previous component in child components . @param childComponents child components . @param previous current previous component . @return previous component .
private Component findPrevInChildComponents(List<Component> childComponents, Component previous) {
    Component previousComponent = previous;
    childComponents.sort(comparator);
    Collections.reverse(childComponents);
    for (Component child : childComponents) {
      if (!child.isVisible()) {
        continue;
      }
      if (!child.isEmpty()) {
        Component cprev = findPrevInChildComponents(child.getChildComponents(), previousComponent);
        if (previousComponent != cprev) {
          return cprev;
        }
      } else if (isFF(child)) {
        return child;
      }
    }
    return previousComponent;
  }
private Component findPrevInChildComponents ( List < Component > childComponents , Component previous ) { Component previousComponent = previous ; childComponents . sort ( comparator ) ; Collections . reverse ( childComponents ) ; for ( Component child : childComponents ) { if ( ! child . isVisible ( ) ) { continue ; } if ( ! child . isEmpty ( ) ) { Component cprev = findPrevInChildComponents ( child . getChildComponents ( ) , previousComponent ) ; if ( previousComponent != cprev ) { return cprev ; } } else if ( isFF ( child ) ) { return child ; } } return previousComponent ; }
Used to find previous component in child components.
Used to find previous component in child components .