src/main/java/com/spinyowl/legui/component/misc/listener/component/TabKeyEventListener.java
private Component findNextInChildComponents(List<Component> childComponents, Component next) {
    if (childComponents.isEmpty()) {
      return next;
    }

    childComponents.sort(comparator);

    for (Component child : childComponents) {
      if (!child.isVisible()) {
        continue;
      }
      if (isFF(child)) {
        return child;
      } else if (!child.isEmpty()) {
        Component cnext = findNextInChildComponents(child.getChildComponents(), next);
        if (next != cnext) {
          return cnext;
        }
      }
    }

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