Package org.apache.fop.fo.flow

Examples of org.apache.fop.fo.flow.Table


     * Main constructor
     * @param parent Parent layout manager
     */
    public TableContentLayoutManager(TableLayoutManager parent) {
        this.tableLM = parent;
        Table table = getTableLM().getTable();
        this.bodyIter = new TableRowIterator(table, getTableLM().getColumns(),
                TableRowIterator.BODY);
        if (table.getTableHeader() != null) {
            headerIter = new TableRowIterator(table,
                    getTableLM().getColumns(), TableRowIterator.HEADER);
        }
        if (table.getTableFooter() != null) {
            footerIter = new TableRowIterator(table,
                    getTableLM().getColumns(), TableRowIterator.FOOTER);
        }
    }
View Full Code Here


     * the table is not expected to have a footer
     * @param expectedBodyRowLengths expected row-group sizes for the body(-ies)
     */
    private void checkNextTableRowGroups(int[] expectedHeaderRowLengths,
            int[] expectedFooterRowLengths, int[] expectedBodyRowLengths) {
        Table table = (Table) tableIterator.next();
        ColumnSetup columnSetup = (ColumnSetup) columnSetupIterator.next();
        TableRowIterator tri;
        if (expectedHeaderRowLengths != null) {
            tri = new TableRowIterator(table, columnSetup, TableRowIterator.HEADER);
            checkTablePartRowGroups(tri, expectedHeaderRowLengths);
View Full Code Here

        }
    }
   
    public static class TableLayoutManagerMaker extends Maker {
        public void make(FONode node, List lms) {
            Table table = (Table) node;
            TableLayoutManager tlm = new TableLayoutManager(table);
            lms.add(tlm);
        }
View Full Code Here

            if (color == null
                    && fobj.getParent() != null
                    && fobj.getParent().getParent() != null
                    && fobj.getParent().getParent().getParent() instanceof Table) {

                Table table = (Table)fobj.getParent().getParent().getParent();
                brd = table.getCommonBorderPaddingBackground();
                color = brd.backgroundColor;
            }
           
           
        }
View Full Code Here

            }


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

            //recurse all table-columns
            if (table.getColumns() != null) {
                for (Iterator it = table.getColumns().iterator(); it.hasNext();) {
                    recurseFONode( (FONode) it.next() );
                }
            } else {
                //TODO Implement implicit column setup handling!
                log.warn("No table-columns found on table. RTF output requires that all"
                        + " table-columns for a table are defined. Output will be incorrect.");
            }

            //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() );
View Full Code Here

            if (color == null
                    && fobj.getParent() != null
                    && fobj.getParent().getParent() != null
                    && fobj.getParent().getParent().getParent() instanceof Table) {

                Table table = (Table)fobj.getParent().getParent().getParent();
                brd = table.getCommonBorderPaddingBackground();
                color = brd.backgroundColor;
            }
           
           
        }
View Full Code Here

     * Main constructor
     * @param parent Parent layout manager
     */
    public TableContentLayoutManager(TableLayoutManager parent) {
        this.tableLM = parent;
        Table table = getTableLM().getTable();
        this.bodyIter = new TableRowIterator(table, getTableLM().getColumns(),
                TableRowIterator.BODY);
        if (table.getTableHeader() != null) {
            headerIter = new TableRowIterator(table,
                    getTableLM().getColumns(), TableRowIterator.HEADER);
        }
        if (table.getTableFooter() != null) {
            footerIter = new TableRowIterator(table,
                    getTableLM().getColumns(), TableRowIterator.FOOTER);
        }
    }
View Full Code Here

        }
    }
   
    public static class TableLayoutManagerMaker extends Maker {
        public void make(FONode node, List lms) {
            Table table = (Table) node;
            TableLayoutManager tlm = new TableLayoutManager(table);
            lms.add(tlm);
        }
View Full Code Here

            }


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

            //recurse all table-columns
            if (table.getColumns() != null) {
                for (Iterator it = table.getColumns().iterator(); it.hasNext();) {
                    recurseFONode( (FONode) it.next() );
                }
            } else {
                //TODO Implement implicit column setup handling!
                log.warn("No table-columns found on table. RTF output requires that all"
                        + " table-columns for a table are defined. Output will be incorrect.");
            }

            //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() );
View Full Code Here

                span = pInfo.getPropertyList().get(Constants.PR_NUMBER_COLUMNS_SPANNED)
                                    .getNumeric().getValue();
            }

            /* return the property from the column */
            Table t = ((TableFObj) fo).getTable();
            List cols = t.getColumns();
            if (cols == null) {
                //no columns defined => no match: return default value
                return pInfo.getPropertyList().get(propId, false, true);
            } else {
                if (t.isColumnNumberUsed(columnNumber)) {
                    //easiest case: exact match
                    return ((TableColumn) cols.get(columnNumber - 1)).getProperty(propId);
                } else {
                    //no exact match: try all spans...
                    while (--span > 0 && !t.isColumnNumberUsed(++columnNumber)) {
                        //nop: just increment/decrement
                    }
                    if (t.isColumnNumberUsed(columnNumber)) {
                        return ((TableColumn) cols.get(columnNumber - 1)).getProperty(propId);
                    } else {
                        //no match: return default value
                        return pInfo.getPropertyList().get(propId, false, true);
                    }
View Full Code Here

TOP

Related Classes of org.apache.fop.fo.flow.Table

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.