Package org.apache.fop.fo

Examples of org.apache.fop.fo.FONode


   
    /**
     * @return the table owning this cell
     */
    public Table getTable() {
        FONode node = fobj.getParent();
        while (!(node instanceof Table)) {
            node = node.getParent();
        }
        return (Table)node;
    }
View Full Code Here


                        lastForced = node;
                        node.fitRecoveryCounter = lastTooLong.previous.fitRecoveryCounter + 1;
                        log.debug("first part doesn't fit into line, recovering: "
                                + node.fitRecoveryCounter);
                        if (node.fitRecoveryCounter > getMaxRecoveryAttempts()) {
                            FONode contextFO = findContextFO(par, node.position + 1);
                            throw new RuntimeException(FONode.decorateWithContextInfo(
                                    "Some content could not fit "
                                    + "into a line/page after " + getMaxRecoveryAttempts()
                                    + " attempts. Giving up to avoid an endless loop.", contextFO));
                        }
View Full Code Here

            baseIter = node.getChildNodes();
            if (baseIter == null) {
                return;
            }
            while (baseIter.hasNext()) {
                FONode child = (FONode) baseIter.next();
                makeLayoutManagers(child, lms);
            }
        }      
View Full Code Here

            baseIter = node.getChildNodes();
            if (baseIter == null) {
                return;
            }
            while (baseIter.hasNext()) {
                FONode child = (FONode) baseIter.next();
                makeLayoutManagers(child, lms);
            }
        }      
View Full Code Here

        }
        List newLMs = new ArrayList(size);
        while (fobjIter.hasNext() && newLMs.size() < size ) {
            Object theobj = fobjIter.next();
            if (theobj instanceof FONode) {
                FONode foNode = (FONode) theobj;
                if (foNode instanceof RetrieveMarker) {
                    foNode = getPSLM().resolveRetrieveMarker(
                        (RetrieveMarker) foNode);
                }
                if (foNode != null) {
View Full Code Here

        invokeDeferredEvent(foNode, true);

        if (foNode instanceof PageSequence) {
            PageSequence pageSequence = (PageSequence) foNode;

            FONode regionBefore = (FONode) pageSequence.flowMap.get("xsl-region-before");
            FONode regionAfter  = (FONode) pageSequence.flowMap.get("xsl-region-after");

            if (regionBefore != null) {
                recurseFONode(regionBefore);
            }

            if (regionAfter != null) {
                recurseFONode(regionAfter);
            }

            recurseFONode( pageSequence.getMainFlow() );
        } else if (foNode instanceof Table) {
            Table table = (Table) foNode;

            //recurse all table-columns
            for (Iterator it = table.getColumns().iterator(); it.hasNext();) {
                recurseFONode( (FONode) it.next() );
            }

            //recurse table-header
            if (table.getTableHeader() != null) {
                recurseFONode( table.getTableHeader() );
            }

            //recurse table-footer
            if (table.getTableFooter() != null) {
                recurseFONode( table.getTableFooter() );
            }

            if (foNode.getChildNodes() != null) {
                for (Iterator it = foNode.getChildNodes(); it.hasNext();) {
                    recurseFONode( (FONode) it.next() );
                }
            }
        } else if (foNode instanceof ListItem) {
            ListItem item = (ListItem) foNode;

            recurseFONode(item.getLabel());
            recurseFONode(item.getBody());
        } else if (foNode instanceof Footnote) {
            Footnote fn = (Footnote)foNode;

            recurseFONode(fn.getFootnoteCitation());
            recurseFONode(fn.getFootnoteBody());
        } else {
            //Any other FO-Object: Simply recurse through all childNodes.
            if (foNode.getChildNodes() != null) {
                for (Iterator it = foNode.getChildNodes(); it.hasNext();) {
                    FONode fn = (FONode)it.next();
                    if (log.isTraceEnabled()) {
                        log.trace("  ChildNode for " + fn + " (" + fn.getName() + ")");
                    }
                    recurseFONode(fn);
                }
            }
        }
View Full Code Here

   
    /**
     * @return the table owning this cell
     */
    public Table getTable() {
        FONode node = fobj.getParent();
        while (!(node instanceof Table)) {
            node = node.getParent();
        }
        return (Table)node;
    }
View Full Code Here

     * @return false only if there was a previous cell, which
     *         had ends-row="false" (implicit or explicit)
     */
    public boolean lastCellEndedRow() {
        if (childNodes != null) {
            FONode prevNode = (FONode) childNodes.get(childNodes.size() - 1);
            if (prevNode.getNameId() == FO_TABLE_CELL) {
                return ((TableCell) prevNode).endsRow();
            }
        }
        return true;
    }
View Full Code Here

        savePropertyListMaker = null;
        // unparent the child property lists
        Iterator iter = getChildNodes();
        if (iter != null) {
            while (iter.hasNext()) {
                FONode child = (FONode) iter.next();
                MarkerPropertyList pList
                    = (MarkerPropertyList) descPLists.get(child);
                if (pList != null) {
                    pList.setParentPropertyList(null);
                }
View Full Code Here

    private void cloneSubtree(Iterator parentIter, FONode newParent,
                              Marker marker, Map descPLists)
        throws FOPException {
        if (parentIter == null) return;
        while (parentIter.hasNext()) {
            FONode child = (FONode) parentIter.next();
            FONode newChild = child.clone(newParent, true);
            descPLists.put(newChild, marker.getPList(child));
            cloneSubtree(child.getChildNodes(), newChild, marker, descPLists);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.fop.fo.FONode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.