Package org.xhtmlrenderer.css.style.derived

Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet.top()


            case LEFT:
                return (int) (margin.left() + border.left() + padding.left());
            case RIGHT:
                return (int) (margin.right() + border.right() + padding.right());
            case TOP:
                return (int) (margin.top() + border.top() + padding.top());
            case BOTTOM:
                return (int) (margin.bottom() + border.bottom() + padding.bottom());
            default:
                throw new IllegalArgumentException();
        }
View Full Code Here


        BorderPropertySet border = getBorder(c);
        RectPropertySet padding = getPadding(c);
       
        FSFontMetrics metrics = getStyle().getFSFontMetrics(c);
       
        setHeight((int)Math.ceil(border.top() + padding.top() + metrics.getAscent() +
                metrics.getDescent() + padding.bottom() + border.bottom()));
    }

    public int getBaseline() {
        return _baseline;
View Full Code Here

        BorderPropertySet border = getBorder(cssCtx);
        RectPropertySet padding = getPadding(cssCtx);
       
        Rectangle result = new Rectangle(
                (int)(left + marginLeft),
                (int)(top - border.top() - padding.top()),
                (int)(getInlineWidth(cssCtx) - marginLeft - marginRight),
                getHeight());
        return result;
    }
   
View Full Code Here

            }
        }
       
        Rectangle result = new Rectangle(
                (int)(left + marginLeft + borderLeft + paddingLeft),
                (int)(top - border.top() - padding.top()),
                (int)(getInlineWidth(cssCtx) - marginLeft - borderLeft - paddingLeft
                    - paddingRight - borderRight - marginRight),
                getHeight());
        return result;
    }
View Full Code Here

                int spill = 0;
                for (Iterator i = getChildIterator(); i.hasNext(); ) {
                    TableCellBox cell = (TableCellBox)i.next();
                    BorderPropertySet collapsed = cell.getCollapsedPaintingBorder();
                    if (collapsed != null) {
                        spill = Math.max(spill, (int)collapsed.top() / 2);
                    }
                }
   
                // be sure that the current start of the row is >= the start of the page
                int borderTop = getAbsY() + currentDelta + (int)getMargin(c).top() - spill;
View Full Code Here

        result.setTextBottom((int) (result.getBaseline() + fm.getDescent()));

        RectPropertySet padding = iB.getPadding(c);
        BorderPropertySet border = iB.getBorder(c);

        result.setPaintingTop((int)Math.floor(iB.getY() - border.top() - padding.top()));
        result.setPaintingBottom((int)Math.ceil(iB.getY() +
                fm.getAscent() + fm.getDescent() +
                border.bottom() + padding.bottom()));

        return result;
View Full Code Here

            int top;
            if (c.getPageNo() == _contentLimitContainer.getInitialPageNo()) {
                top = result.y;
            } else {
                top = limit.getTop() - (int)padding.top() -
                    (int)border.top() - getStyle().getBorderVSpacing(c);
                if (getChildCount() > 0) {
                    TableSectionBox section = (TableSectionBox)getChild(0);
                    if (section.isHeader()) {
                        top -= section.getHeight();
                    }
View Full Code Here

                if (row != null) {
                    int spill = 0;
                    for (Iterator i = row.getChildIterator(); i.hasNext(); ) {
                        TableCellBox cell = (TableCellBox)i.next();
                        BorderPropertySet collapsed = cell.getCollapsedPaintingBorder();
                        int tmp = (int)collapsed.top() / 2;
                        if (tmp > spill) {
                            spill = tmp;
                        }
                    }
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.