if (node == null) throw new IllegalArgumentException("No node."); ImageDisplay parent = node.getParentDisplay(); if (parent != null) scrollToNode(node.getBounds(), parent, (parent.getParentDisplay() == null));
JScrollPane dskDecorator = parent.getDeskDecorator(); Rectangle viewRect = dskDecorator.getViewport().getViewRect(); if (!viewRect.contains(childBounds)) { JScrollBar vBar = dskDecorator.getVerticalScrollBar(); JScrollBar hBar = dskDecorator.getHorizontalScrollBar(); vBar.setValue(childBounds.y); hBar.setValue(childBounds.x); } if (!isRoot) { ImageDisplay node = parent.getParentDisplay(); scrollToNode(childBounds, node, (node.getParentDisplay() == null)); }
    void scrollToNode(ImageDisplay node)    {        if (node == null) throw new IllegalArgumentException("No node.");        ImageDisplay parent = node.getParentDisplay();        if (parent != null)            scrollToNode(node.getBounds(), parent,                    (parent.getParentDisplay() == null));     }