Package org.apache.fop.fo.flow.table

Examples of org.apache.fop.fo.flow.table.TableColumn


        List rawCols = table.getColumns();
        if (rawCols != null) {
            int colnum = 1;
            ListIterator iter = rawCols.listIterator();
            while (iter.hasNext()) {
                TableColumn col = (TableColumn)iter.next();
                if (col == null) {
                    continue;
                }
                colnum = col.getColumnNumber();
                for (int i = 0; i < col.getNumberColumnsRepeated(); i++) {
                    while (colnum > columns.size()) {
                        columns.add(null);
                    }
                    columns.set(colnum - 1, col);
                    colnum++;
                }
            }
            //Post-processing the list (looking for gaps)
            int pos = 1;
            ListIterator ppIter = columns.listIterator();
            while (ppIter.hasNext()) {
                TableColumn col = (TableColumn)ppIter.next();
                if (col == null) {
                    log.error("Found a gap in the table-columns at position " + pos);
                }
                pos++;
            }
View Full Code Here


     * Initializes the column's widths
     *
     */
    private void initializeColumnWidths() {

        TableColumn col;
        Length colWidth;

        for (int i = columns.size(); --i >= 0;) {
            if (columns.get(i) != null) {
                col = (TableColumn) columns.get(i);
                colWidth = col.getColumnWidth();
                colWidths.add(0, colWidth);
            }
        }
        colWidths.add(0, null);
    }
View Full Code Here

    }

    /** Adds background areas for the column, body and row, if any. */
    private void addBackgroundAreas(RowPainter painter, int firstRowHeight, int borderBeforeWidth,
            int paddingRectBPD) {
        TableColumn column = getTable().getColumn(primaryGridUnit.getColIndex());
        if (column.getCommonBorderPaddingBackground().hasBackground()) {
            Block colBackgroundArea = getBackgroundArea(paddingRectBPD, borderBeforeWidth);
            ((TableLayoutManager) parentLM).registerColumnBackgroundArea(column, colBackgroundArea,
                    -startIndent);
        }

View Full Code Here

        List rawCols = table.getColumns();
        if (rawCols != null) {
            int colnum = 1;
            ListIterator iter = rawCols.listIterator();
            while (iter.hasNext()) {
                TableColumn col = (TableColumn)iter.next();
                if (col == null) {
                    continue;
                }
                colnum = col.getColumnNumber();
                for (int i = 0; i < col.getNumberColumnsRepeated(); i++) {
                    while (colnum > columns.size()) {
                        columns.add(null);
                    }
                    columns.set(colnum - 1, col);
                    colnum++;
                }
            }
            //Post-processing the list (looking for gaps)
            int pos = 1;
            ListIterator ppIter = columns.listIterator();
            while (ppIter.hasNext()) {
                TableColumn col = (TableColumn)ppIter.next();
                if (col == null) {
                    log.error("Found a gap in the table-columns at position " + pos);
                }
                pos++;
            }
View Full Code Here

     * Initializes the column's widths
     *
     */
    private void initializeColumnWidths() {
       
        TableColumn col;
        Length colWidth;
       
        for (int i = columns.size(); --i >= 0;) {
            if (columns.get(i) != null) {
                col = (TableColumn) columns.get(i);
                colWidth = col.getColumnWidth();
                colWidths.add(0, colWidth);
            }
        }
        colWidths.add(0, null);
    }
View Full Code Here

        List rawCols = table.getColumns();
        if (rawCols != null) {
            int colnum = 1;
            ListIterator iter = rawCols.listIterator();
            while (iter.hasNext()) {
                TableColumn col = (TableColumn)iter.next();
                if (col == null) {
                    continue;
                }
                colnum = col.getColumnNumber();
                for (int i = 0; i < col.getNumberColumnsRepeated(); i++) {
                    while (colnum > columns.size()) {
                        columns.add(null);
                    }
                    columns.set(colnum - 1, col);
                    colnum++;
                }
            }
            //Post-processing the list (looking for gaps)
            //TODO The following block could possibly be removed
            int pos = 1;
            ListIterator ppIter = columns.listIterator();
            while (ppIter.hasNext()) {
                TableColumn col = (TableColumn)ppIter.next();
                if (col == null) {
                    assert false; //Gaps are filled earlier by fo.flow.table.Table.finalizeColumns()
                    //log.error("Found a gap in the table-columns at position " + pos);
                }
                pos++;
View Full Code Here

    public TableColumn getColumn(int index) {
        int size = columns.size();
        if (index > size) {
            if (index > maxColIndexReferenced) {
                maxColIndexReferenced = index;
                TableColumn col = getColumn(1);
                if (!(size == 1 && col.isImplicitColumn())) {
                    assert false; //TODO Seems to be removable as this is now done in the FO tree
                    log.warn(FONode.decorateWithContextInfo(
                            "There are fewer table-columns than are needed. "
                            + "Column " + index + " was accessed, but only "
                            + size + " columns have been defined. "
View Full Code Here

     * Initializes the column's widths
     *
     */
    private void initializeColumnWidths() {

        TableColumn col;
        Length colWidth;

        for (int i = columns.size(); --i >= 0;) {
            if (columns.get(i) != null) {
                col = (TableColumn) columns.get(i);
                colWidth = col.getColumnWidth();
                colWidths.add(0, colWidth);
            }
        }
        colWidths.add(0, null);
    }
View Full Code Here

            return; //no borders, no area necessary
        }

        TableLayoutManager tableLM = tclm.getTableLM();
        Table table = tableLM.getTable();
        TableColumn col = tclm.getColumns().getColumn(colIndex + 1);

        //position information
        boolean firstOnPage = (rowIndex == firstRowOnPageIndex);
        boolean inFirstColumn = (colIndex == 0);
        boolean inLastColumn = (colIndex == table.getNumberOfColumns() - 1);

        //determine the block area's size
        int ipd = col.getColumnWidth().getValue(tableLM);
        ipd -= (borderStart.getRetainedWidth() + borderEnd.getRetainedWidth()) / 2;
        int bpd = actualRowHeight;
        bpd -= (borderBefore.getRetainedWidth() + borderAfter.getRetainedWidth()) / 2;

        //generate the block area
View Full Code Here

        List rawCols = table.getColumns();
        if (rawCols != null) {
            int colnum = 1;
            ListIterator iter = rawCols.listIterator();
            while (iter.hasNext()) {
                TableColumn col = (TableColumn)iter.next();
                if (col == null) {
                    continue;
                }
                colnum = col.getColumnNumber();
                for (int i = 0; i < col.getNumberColumnsRepeated(); i++) {
                    while (colnum > columns.size()) {
                        columns.add(null);
                    }
                    columns.set(colnum - 1, col);
                    colnum++;
                }
            }
            //Post-processing the list (looking for gaps)
            //TODO The following block could possibly be removed
            int pos = 1;
            ListIterator ppIter = columns.listIterator();
            while (ppIter.hasNext()) {
                TableColumn col = (TableColumn)ppIter.next();
                if (col == null) {
                    assert false; //Gaps are filled earlier by fo.flow.table.Table.finalizeColumns()
                    //log.error("Found a gap in the table-columns at position " + pos);
                }
                pos++;
View Full Code Here

TOP

Related Classes of org.apache.fop.fo.flow.table.TableColumn

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.