Examples of BorderInfo


Examples of org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo

    private void addAreaForEmptyGridUnit(EmptyGridUnit gu, int rowIndex, int colIndex,
            int actualRowHeight,
            int borderBeforeWhich, int borderAfterWhich, boolean lastOnPage) {

        //get effective borders
        BorderInfo borderBefore = gu.getBorderBefore(borderBeforeWhich);
        BorderInfo borderAfter = gu.getBorderAfter(borderAfterWhich);
        BorderInfo borderStart = gu.getBorderStart();
        BorderInfo borderEnd = gu.getBorderEnd();
        if (borderBefore.getRetainedWidth() == 0
                && borderAfter.getRetainedWidth() == 0
                && borderStart.getRetainedWidth() == 0
                && borderEnd.getRetainedWidth() == 0) {
            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
        Block block = new Block();
View Full Code Here

Examples of org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo

            //table
            current[5] = table.getCommonBorderPaddingBackground().getBorderInfo(side);
        }
        //other[6] is always null, since it's always the same table
       
        BorderInfo resolved = null;
       
        // *** Rule 1 ***
        resolved = doRule1(current, other);
        if (resolved != null) {
            return resolved;
View Full Code Here

Examples of org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo

            }
            if ((other[i] != null) && (other[i].getRetainedWidth() > width)) {
                width = other[i].getRetainedWidth();
            }
        }
        BorderInfo widest = null;
        int count = 0;
        //See if there's only one with the widest border
        for (int i = 0; i < current.length; i++) {
            if ((current[i] != null) && (current[i].getRetainedWidth() == width)) {
                count++;
View Full Code Here

Examples of org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo

                if (currPref > pref) {
                    pref = currPref;
                }
            }
        }
        BorderInfo preferred = null;
        int count = 0;
        //See if there's only one with the preferred border style
        for (int i = 0; i < current.length; i++) {
            if (current[i] != null) {
                int currPref = getPreferenceValue(current[i].getStyle());
View Full Code Here

Examples of org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo

                Block[][] blocks = new Block[getTableCell().getNumberRowsSpanned()][getTableCell()
                        .getNumberColumnsSpanned()];
                GridUnit[] gridUnits = (GridUnit[]) primaryGridUnit.getRows().get(startRow);
                for (int x = 0; x < getTableCell().getNumberColumnsSpanned(); x++) {
                    GridUnit gu = gridUnits[x];
                    BorderInfo border = gu.getBorderBefore(borderBeforeWhich);
                    int borderWidth = border.getRetainedWidth() / 2;
                    if (borderWidth > 0) {
                        addBorder(blocks, startRow, x, Trait.BORDER_BEFORE, border, firstOnPage);
                        adjustYOffset(blocks[startRow][x], -borderWidth);
                        adjustBPD(blocks[startRow][x], -borderWidth);
                    }
                }
                gridUnits = (GridUnit[]) primaryGridUnit.getRows().get(endRow);
                for (int x = 0; x < getTableCell().getNumberColumnsSpanned(); x++) {
                    GridUnit gu = gridUnits[x];
                    BorderInfo border = gu.getBorderAfter(borderAfterWhich);
                    int borderWidth = border.getRetainedWidth() / 2;
                    if (borderWidth > 0) {
                        addBorder(blocks, endRow, x, Trait.BORDER_AFTER, border, lastOnPage);
                        adjustBPD(blocks[endRow][x], -borderWidth);
                    }
                }
                for (int y = startRow; y <= endRow; y++) {
                    gridUnits = (GridUnit[]) primaryGridUnit.getRows().get(y);
                    BorderInfo border = gridUnits[0].getBorderStart();
                    int borderWidth = border.getRetainedWidth() / 2;
                    if (borderWidth > 0) {
                        addBorder(blocks, y, 0, Trait.BORDER_START, border, inFirstColumn);
                        adjustXOffset(blocks[y][0], borderWidth);
                        adjustIPD(blocks[y][0], -borderWidth);
                    }
                    border = gridUnits[gridUnits.length - 1].getBorderEnd();
                    borderWidth = border.getRetainedWidth() / 2;
                    if (borderWidth > 0) {
                        addBorder(blocks, y, gridUnits.length - 1, Trait.BORDER_END, border,
                                inLastColumn);
                        adjustIPD(blocks[y][gridUnits.length - 1], -borderWidth);
                    }
View Full Code Here

Examples of org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo

            //table
            current[5] = table.getCommonBorderPaddingBackground().getBorderInfo(side);
        }
        //other[6] is always null, since it's always the same table
       
        BorderInfo resolved = null;
       
        // *** Rule 1 ***
        resolved = doRule1(current, other);
        if (resolved != null) {
            return resolved;
View Full Code Here

Examples of org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo

            }
            if ((other[i] != null) && (other[i].getRetainedWidth() > width)) {
                width = other[i].getRetainedWidth();
            }
        }
        BorderInfo widest = null;
        int count = 0;
        //See if there's only one with the widest border
        for (int i = 0; i < current.length; i++) {
            if ((current[i] != null) && (current[i].getRetainedWidth() == width)) {
                count++;
View Full Code Here

Examples of org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo

                if (currPref > pref) {
                    pref = currPref;
                }
            }
        }
        BorderInfo preferred = null;
        int count = 0;
        //See if there's only one with the preferred border style
        for (int i = 0; i < current.length; i++) {
            if (current[i] != null) {
                int currPref = getPreferenceValue(current[i].getStyle());
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.