use of org.olat.core.util.component.ComponentTraverser in project OpenOLAT by OpenOLAT.
the class ComponentHelper method findWindowWithComponentInIt.
/**
* REVIEW:pb: 2008-05-05 -> not referenced from .html or .java
* @param wins
* @param compToFind
* @return
* @deprecated
*/
protected static Window findWindowWithComponentInIt(Windows wins, final Component compToFind) {
Window awin = null;
for (Iterator<Window> it_wins = wins.getWindowIterator(); it_wins.hasNext(); ) {
awin = it_wins.next();
// find the correct component within the window
MyVisitor v = new MyVisitor(compToFind);
ComponentTraverser ct = new ComponentTraverser(v, awin.getContentPane(), false);
ct.visitAll(null);
if (v.f != null)
return awin;
}
return null;
}
Aggregations