if (item == null) { continue; } else if (item.isRealVisible()) { count++; Treechildren chdrn = item.getTreechildren(); if (cmp instanceof Treeitem) { Treeitem parent = (Treeitem) cmp; if (parent.isRealVisible()) { parent.setOpen(true); items.add(0, parent);
/*package*/ boolean isRealVisible() { if (!isVisible()) return false; Component comp = getParent(); if (comp == null) return true; if (!(comp instanceof Treeitem)) return comp.isVisible(); Treeitem item = (Treeitem) comp; return item.isOpen() && item.isRealVisible(); }
return false; // full final Treeitem item = (Treeitem) cmp; if (item.isRealVisible()) { int count = item.isOpen() && item.getTreechildren() != null ? item.getTreechildren().getVisibleItemCount() : 0;
/** Sets the active page in which the specified item is. * The active page will become the page that contains the specified item. * * @param item the item to show. If the item is null, invisible, or doesn't belong * to the same tree, nothing happens. * @since 3.0.4 */ public void setActivePage(Treeitem item) { if (item.isRealVisible() && item.getTree() == this && isVisible()) { int index = getVisibleIndexOfItem(item); if (index != -1) { final Paginal pgi = getPaginal(); int pg = index / pgi.getPageSize(); if (pg != getActivePage()) setActivePage(pg); } } }
protected void redrawChildren(Writer out) throws IOException { Tree tree = getTree(); if (!tree.inPagingMold()) { super.redrawChildren(out); } else if (isRealVisible() && shallVisitTree(tree, this)) { if (shallRenderTree(tree)) { ComponentCtrl child = getTreerow(); if (child != null) child.redraw(out); } boolean close = !isOpen(); ComponentCtrl child = getTreechildren(); if (child != null) { if (close) ((Component) child).setAttribute(Attributes.SHALL_RENDER_ITEM, Boolean.TRUE); child.redraw(out); if (close) ((Component) child).removeAttribute(Attributes.SHALL_RENDER_ITEM); } } }