Пример #1
0
  /** Whether this component is an ancestor of the specified component */
  @Override
  public boolean isAncestorOf(Component member) {

    assert member != null;

    Component ancestor = member.getGroup();
    while (ancestor != null && !ancestor.equals(this)) {
      ancestor = ancestor.getGroup();
    }

    return ancestor != null;
  }