Examples of EffRow


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

     *
     * @param activeCellList the list that will hold the active cells
     * @param rowIndex the index of the row from which cells must be activated
     */
    private void activateCells(List activeCellList, int rowIndex) {
        EffRow row = rowGroup[rowIndex];
        for (int i = 0; i < columnCount; i++) {
            GridUnit gu = row.getGridUnit(i);
            if (!gu.isEmpty() && gu.isPrimary()) {
                activeCellList.add(new ActiveCell((PrimaryGridUnit) gu, row, rowIndex,
                        previousRowsLength, getTableLM()));
            }
        }
View Full Code Here

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

            log.debug("===handleTableContentPosition(" + tcpos);
        }
        if (currentRow == null) {
            currentRow = tcpos.getNewPageRow();
        } else {
            EffRow row = tcpos.getRow();
            if (row.getIndex() > currentRow.getIndex()) {
                addAreasAndFlushRow(false, false);
                currentRow = row;
            }
        }
        if (firstRowIndex < 0) {
View Full Code Here

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

     *
     * @param activeCellList the list that will hold the active cells
     * @param rowIndex the index of the row from which cells must be activated
     */
    private void activateCells(List activeCellList, int rowIndex) {
        EffRow row = rowGroup[rowIndex];
        for (int i = 0; i < columnCount; i++) {
            GridUnit gu = row.getGridUnit(i);
            if (!gu.isEmpty() && gu.isPrimary()) {
                activeCellList.add(new ActiveCell((PrimaryGridUnit) gu, row, rowIndex,
                        previousRowsLength, getTableLM()));
            }
        }
View Full Code Here

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

            log.debug("===handleTableContentPosition(" + tcpos);
        }
        if (currentRow == null) {
            currentRow = tcpos.getNewPageRow();
        } else {
            EffRow row = tcpos.getRow();
            if (row.getIndex() > currentRow.getIndex()) {
                addAreasAndFlushRow(false, false);
                currentRow = row;
            }
        }
        if (firstRowIndex < 0) {
View Full Code Here

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

     * @param rowGroup row group to process
     */
    private void createElementsForRowGroup(LayoutContext context, int alignment,
            int bodyType, LinkedList returnList) {
        log.debug("Handling row group with " + rowGroup.length + " rows...");
        EffRow row;
        for (int rgi = 0; rgi < rowGroup.length; rgi++) {
            row = rowGroup[rgi];
            for (Iterator iter = row.getGridUnits().iterator(); iter.hasNext();) {
                GridUnit gu = (GridUnit) iter.next();
                if (gu.isPrimary()) {
                    PrimaryGridUnit primary = gu.getPrimary();
                    // TODO a new LM must be created for every new static-content
                    primary.createCellLM();
View Full Code Here

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

     * W3C regarding whether borders or border-separation must be included or not
     */
    private void computeRowHeights() {
        log.debug("rowGroup:");
        MinOptMax[] rowHeights = new MinOptMax[rowGroup.length];
        EffRow row;
        for (int rgi = 0; rgi < rowGroup.length; rgi++) {
            row = rowGroup[rgi];
            // The BPD of the biggest cell in the row
//            int maxCellBPD = 0;
            MinOptMax explicitRowHeight;
            TableRow tableRowFO = rowGroup[rgi].getTableRow();
            if (tableRowFO == null) {
                rowHeights[rgi] = new MinOptMax(0, 0, Integer.MAX_VALUE);
                explicitRowHeight = new MinOptMax(0, 0, Integer.MAX_VALUE);
            } else {
                LengthRangeProperty rowBPD = tableRowFO.getBlockProgressionDimension();
                rowHeights[rgi] = MinOptMaxUtil.toMinOptMax(rowBPD, tableLM);
                explicitRowHeight = MinOptMaxUtil.toMinOptMax(rowBPD, tableLM);
            }
            for (Iterator iter = row.getGridUnits().iterator(); iter.hasNext();) {
                GridUnit gu = (GridUnit) iter.next();
                if (!gu.isEmpty() && gu.getColSpanIndex() == 0 && gu.isLastGridUnitRowSpan()) {
                    PrimaryGridUnit primary = gu.getPrimary();
                    int effectiveCellBPD = 0;
                    LengthRangeProperty cellBPD = primary.getCell().getBlockProgressionDimension();
                    if (!cellBPD.getMinimum(tableLM).isAuto()) {
                        effectiveCellBPD = cellBPD.getMinimum(tableLM).getLength()
                                .getValue(tableLM);
                    }
                    if (!cellBPD.getOptimum(tableLM).isAuto()) {
                        effectiveCellBPD = cellBPD.getOptimum(tableLM).getLength()
                                .getValue(tableLM);
                    }
                    if (gu.getRowSpanIndex() == 0) {
                        effectiveCellBPD = Math.max(effectiveCellBPD, explicitRowHeight.opt);
                    }
                    effectiveCellBPD = Math.max(effectiveCellBPD, primary.getContentLength());
                    int borderWidths = primary.getBeforeAfterBorderWidth();
                    int padding = 0;
                    CommonBorderPaddingBackground cbpb = primary.getCell()
                            .getCommonBorderPaddingBackground();
                    padding += cbpb.getPaddingBefore(false, primary.getCellLM());
                    padding += cbpb.getPaddingAfter(false, primary.getCellLM());
                    int effRowHeight = effectiveCellBPD + padding + borderWidths;
                    for (int prev = rgi - 1; prev >= rgi - gu.getRowSpanIndex(); prev--) {
                        effRowHeight -= rowHeights[prev].opt;
                    }
                    if (effRowHeight > rowHeights[rgi].min) {
                        // This is the new height of the (grid) row
                        MinOptMaxUtil.extendMinimum(rowHeights[rgi], effRowHeight);
                    }
                }
            }

            row.setHeight(rowHeights[rgi]);
            row.setExplicitHeight(explicitRowHeight);
            // TODO re-enable and improve after clarification
//            if (maxCellBPD > row.getExplicitHeight().max) {
//                log.warn(FONode.decorateWithContextInfo(
//                        "The contents of row " + (row.getIndex() + 1)
//                        + " are taller than they should be (there is a"
View Full Code Here

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

        List rowGroup = (List) rowGroupsIter.next();
        EffRow[] effRowGroup = new EffRow[rowGroup.size()];
        int i = 0;
        for (Iterator rowIter = rowGroup.iterator(); rowIter.hasNext();) {
            List gridUnits = (List) rowIter.next();
            effRowGroup[i++] = new EffRow(rowIndex++, tablePart, gridUnits);
        }
        return effRowGroup;
    }
View Full Code Here

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

            log.debug("===handleTableContentPosition(" + tcpos);
        }
        if (currentRow == null) {
            currentRow = tcpos.getNewPageRow();
        } else {
            EffRow row = tcpos.getRow();
            if (row.getIndex() > currentRow.getIndex()) {
                addAreasAndFlushRow(false, false);
                currentRow = row;
            }
        }
        if (firstRowIndex < 0) {
View Full Code Here

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

     *
     * @param activeCellList the list that will hold the active cells
     * @param rowIndex the index of the row from which cells must be activated
     */
    private void activateCells(List activeCellList, int rowIndex) {
        EffRow row = rowGroup[rowIndex];
        for (int i = 0; i < columnCount; i++) {
            GridUnit gu = row.getGridUnit(i);
            if (!gu.isEmpty() && gu.isPrimary()) {
                activeCellList.add(new ActiveCell((PrimaryGridUnit) gu, row, rowIndex,
                        previousRowsLength, getTableLM()));
            }
        }
View Full Code Here

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

     * @param returnList List to received the generated elements
     */
    private void createElementsForRowGroup(LayoutContext context, int alignment,
            int bodyType, LinkedList returnList) {
        log.debug("Handling row group with " + rowGroup.length + " rows...");
        EffRow row;
        for (int rgi = 0; rgi < rowGroup.length; rgi++) {
            row = rowGroup[rgi];
            for (Iterator iter = row.getGridUnits().iterator(); iter.hasNext();) {
                GridUnit gu = (GridUnit) iter.next();
                if (gu.isPrimary()) {
                    PrimaryGridUnit primary = gu.getPrimary();
                    // TODO a new LM must be created for every new static-content
                    primary.createCellLM();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.