boundablesAtLevelWithNode method
@param level -1 to get items
Implementation
void boundablesAtLevelWithNode(int level, AbstractNode top, List boundables) {
Assert.isTrue(level > -2);
if (top.getLevel() == level) {
boundables.add(top);
return;
}
for (Iterator i = top.getChildBoundables().iterator; i.moveNext();) {
Boundable boundable = i.current as Boundable;
if (boundable is AbstractNode) {
boundablesAtLevelWithNode(level, boundable as AbstractNode, boundables);
} else {
Assert.isTrue(boundable is ItemBoundable);
if (level == -1) {
boundables.add(boundable);
}
}
}
return;
}