/** * Prints the component containment hierarchy * * @param c */ public void print(Component c) { walkHierarchy(c, 0); }
/** * Prints the component containment hierarchy * * @param c */ public void print(Component c) { walkHierarchy(c, 0); }
/** Walks down the containment hierarchy depth first and prints each component found */ private void walkHierarchy(Component c, int level) { printComponent(c, level); if (c instanceof MarkupContainer) { MarkupContainer mc = (MarkupContainer) c; for (Iterator<?> it = mc.iterator(); it.hasNext(); ) { walkHierarchy((Component) it.next(), level + 1); } } }
/** * Walks down the containment hierarchy depth first and prints each component found */ private void walkHierarchy(Component c, int level) { printComponent(c, level); if (c instanceof MarkupContainer) { MarkupContainer mc = (MarkupContainer) c; for (Iterator it = mc.iterator(); it.hasNext();) { walkHierarchy((Component) it.next(), level + 1); } } }