src/main/java/org/fit/layout/cssbox/CSSBoxTreeBuilder.java
private void createBoxList(Box root, Vector<BoxNode> list)
    {
        if (root.isDisplayed())
        {
            if (!(root instanceof Viewport) && root.isVisible())
            {
                BoxNode newnode = new BoxNode(root, page, zoom);
                newnode.setOrder(order_counter++);
                list.add(newnode);
            }
            if (root instanceof ElementBox)
            {
                ElementBox elem = (ElementBox) root;
                for (int i = elem.getStartChild(); i < elem.getEndChild(); i++)
                    createBoxList(elem.getSubBox(i), list);
            }
        }
    }
private void createBoxList(Box root, Vector<BoxNode> list)
    {
        if (root.isDisplayed())
        {
            if (!(root instanceof Viewport) && root.isVisible())
            {
                BoxNode newnode = new BoxNode(root, page, zoom);
                newnode.setOrder(order_counter++);
                list.add(newnode);
            }
            if (root instanceof ElementBox)
            {
                ElementBox elem = (ElementBox) root;
                for (int i = elem.getStartChild(); i < elem.getEndChild(); i++)
                    createBoxList(elem.getSubBox(i), list);
            }
        }
    }
Recursively creates a list of all the visible boxes in a box subtree. The nodes are
added to the end of a specified list. The previous content of the list
remains unchanged. The 'viewport' box is ignored.
@param root the source root box
@param list the list that will be filled with the nodes