RadComponent (RadComponent component, List<RadComponent> excludes) { RadComponent parent = component.getParent(); if (parent == null) { return null; } List<RadComponent> children = parent.getChildren(); int size = children.size(); for (int i = children.indexOf(component) + 1; i < size; i++) { RadComponent next = children.get(i); if (!excludes.contains(next)) { return next; } } return parent; }