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

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


    private int getMaxRemainingHeight() {
        int maxW = 0;
        for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
            ActiveCell activeCell = (ActiveCell) iter.next();
            int remain = activeCell.getRemainingLength();
            PrimaryGridUnit pgu = activeCell.getPrimaryGridUnit();
            for (int i = activeRowIndex + 1; i < pgu.getRowIndex() - rowGroup[0].getIndex()
                    + pgu.getCell().getNumberRowsSpanned(); i++) {
                remain -= rowGroup[i].getHeight().opt;
            }
            maxW = Math.max(maxW, remain);
        }
        for (int i = activeRowIndex + 1; i < rowGroup.length; i++) {
View Full Code Here


    private int getMaxRemainingHeight() {
        int maxW = 0;
        for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
            ActiveCell activeCell = (ActiveCell) iter.next();
            int remain = activeCell.getRemainingLength();
            PrimaryGridUnit pgu = activeCell.getPrimaryGridUnit();
            for (int i = activeRowIndex + 1; i < pgu.getRowIndex() - rowGroup[0].getIndex()
                    + pgu.getCell().getNumberRowsSpanned(); i++) {
                remain -= rowGroup[i].getHeight().opt;
            }
            maxW = Math.max(maxW, remain);
        }
        for (int i = activeRowIndex + 1; i < rowGroup.length; i++) {
View Full Code Here

        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();
                    primary.getCellLM().setParent(tableLM);
                    //Calculate width of cell
                    int spanWidth = 0;
                    Iterator colIter = tableLM.getTable().getColumns().listIterator(
                            primary.getColIndex());
                    for (int i = 0, c = primary.getCell().getNumberColumnsSpanned(); i < c; i++) {
                        spanWidth += ((TableColumn) colIter.next()).getColumnWidth().getValue(
                                tableLM);
                    }
                    LayoutContext childLC = new LayoutContext(0);
                    childLC.setStackLimitBP(context.getStackLimitBP()); //necessary?
                    childLC.setRefIPD(spanWidth);
                   
                    //Get the element list for the cell contents
                    LinkedList elems = primary.getCellLM().getNextKnuthElements(
                                            childLC, alignment);
                    ElementListObserver.observe(elems, "table-cell", primary.getCell().getId());
                    primary.setElements(elems);
                }
            }
        }
        computeRowHeights();
        LinkedList elements = tableStepper.getCombinedKnuthElementsForRowGroup(context,
View Full Code Here

                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) {
View Full Code Here

    private int getMaxRemainingHeight() {
        int maxW = 0;
        for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
            ActiveCell activeCell = (ActiveCell) iter.next();
            int remain = activeCell.getRemainingLength();
            PrimaryGridUnit pgu = activeCell.getPrimaryGridUnit();
            for (int i = activeRowIndex + 1; i < pgu.getRowIndex() - rowGroup[0].getIndex()
                    + pgu.getCell().getNumberRowsSpanned(); i++) {
                remain -= rowGroup[i].getHeight().getOpt();
            }
            maxW = Math.max(maxW, remain);
        }
        for (int i = activeRowIndex + 1; i < rowGroup.length; i++) {
View Full Code Here

        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();
                    primary.getCellLM().setParent(tableLM);
                    //Calculate width of cell
                    int spanWidth = 0;
                    Iterator colIter = tableLM.getTable().getColumns().listIterator(
                            primary.getColIndex());
                    for (int i = 0, c = primary.getCell().getNumberColumnsSpanned(); i < c; i++) {
                        spanWidth += ((TableColumn) colIter.next()).getColumnWidth().getValue(
                                tableLM);
                    }
                    LayoutContext childLC = new LayoutContext(0);
                    childLC.setStackLimitBP(context.getStackLimitBP()); //necessary?
                    childLC.setRefIPD(spanWidth);

                    //Get the element list for the cell contents
                    List elems = primary.getCellLM().getNextKnuthElements(
                                            childLC, alignment);
                    ElementListObserver.observe(elems, "table-cell", primary.getCell().getId());
                    primary.setElements(elems);
                }
            }
        }
        computeRowHeights();
        List elements = tableStepper.getCombinedKnuthElementsForRowGroup(context,
View Full Code Here

                explicitRowHeight = rowBPD.toMinOptMax(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.getOpt());
                    }
                    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].getOpt();
                    }
                    if (effRowHeight > rowHeights[rgi].getMin()) {
View Full Code Here

    private int getMaxRemainingHeight() {
        int maxW = 0;
        for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
            ActiveCell activeCell = (ActiveCell) iter.next();
            int remain = activeCell.getRemainingLength();
            PrimaryGridUnit pgu = activeCell.getPrimaryGridUnit();
            for (int i = activeRowIndex + 1; i < pgu.getRowIndex() - rowGroup[0].getIndex()
                    + pgu.getCell().getNumberRowsSpanned(); i++) {
                remain -= rowGroup[i].getHeight().getOpt();
            }
            maxW = Math.max(maxW, remain);
        }
        for (int i = activeRowIndex + 1; i < rowGroup.length; i++) {
View Full Code Here

        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();
                    primary.getCellLM().setParent(tableLM);
                    //Calculate width of cell
                    int spanWidth = 0;
                    Iterator colIter = tableLM.getTable().getColumns().listIterator(
                            primary.getColIndex());
                    for (int i = 0, c = primary.getCell().getNumberColumnsSpanned(); i < c; i++) {
                        spanWidth += ((TableColumn) colIter.next()).getColumnWidth().getValue(
                                tableLM);
                    }
                    LayoutContext childLC = new LayoutContext(0);
                    childLC.setStackLimitBP(context.getStackLimitBP()); //necessary?
                    childLC.setRefIPD(spanWidth);

                    //Get the element list for the cell contents
                    List elems = primary.getCellLM().getNextKnuthElements(
                                            childLC, alignment);
                    ElementListObserver.observe(elems, "table-cell", primary.getCell().getId());
                    primary.setElements(elems);
                }
            }
        }
        computeRowHeights();
        List elements = tableStepper.getCombinedKnuthElementsForRowGroup(context,
View Full Code Here

                explicitRowHeight = rowBPD.toMinOptMax(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.getOpt());
                    }
                    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].getOpt();
                    }
                    if (effRowHeight > rowHeights[rgi].getMin()) {
View Full Code Here

TOP

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

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.