Examples of BorderPropertySet


Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet

    protected void applyComponentStyle(JButton button) {

        super.applyComponentStyle(button);

        CalculatedStyle style = getBox().getStyle();
        BorderPropertySet border = style.getBorder(null);
        boolean disableOSBorder = (border.leftStyle() != null && border.rightStyle() != null || border.topStyle() != null || border.bottomStyle() != null);

        FSColor backgroundColor = style.getBackgroundColor();

        //if a border is set or a background color is set, then use a special JButton with the BasicButtonUI.
        if (disableOSBorder || backgroundColor instanceof FSRGBColor) {
View Full Code Here

Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet

        CollapsedBorderValue top = collapsedTopBorder(c);
        CollapsedBorderValue right = collapsedRightBorder(c);
        CollapsedBorderValue bottom = collapsedBottomBorder(c);
        CollapsedBorderValue left = collapsedLeftBorder(c);
       
        _collapsedPaintingBorder = new BorderPropertySet(top, right, bottom, left);
       
        // Give the extra pixel to top and left.
        top.setWidth((top.width()+1)/2);
        right.setWidth(right.width()/2);
        bottom.setWidth(bottom.width()/2);
        left.setWidth((left.width()+1)/2);
       
        _collapsedLayoutBorder = new BorderPropertySet(top, right, bottom, left);
       
        _collapsedBorderTop = top;
        _collapsedBorderRight = right;
        _collapsedBorderBottom = bottom;
        _collapsedBorderLeft = left;
View Full Code Here

Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet

        if (result.isVariable() || result.isPercent()) {
            return result;
        }
       
        int bordersAndPadding = 0;
        BorderPropertySet border = getBorder(c);
        bordersAndPadding += (int)border.left() + (int)border.right();
       
        RectPropertySet padding = getPadding(c);
        bordersAndPadding += (int)padding.left() + (int)padding.right();
       
        result.setValue(result.value() + bordersAndPadding);
View Full Code Here

Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet

    }

    private void paintBackgroundStack(RenderingContext c, Rectangle bounds) {
        Rectangle imageContainer;
       
        BorderPropertySet border = getStyle().getBorder(c);
        TableColumn column = getTable().colElement(getCol());
        if (column != null) {
            c.getOutputDevice().paintBackground(
                    c, column.getStyle(),
                    bounds, getTable().getColumnBounds(c, getCol()),
View Full Code Here

Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet

   
    public Rectangle getChildrenClipEdge(RenderingContext c) {
        if (c.isPrint() && getTable().getStyle().isPaginateTable()) {
            Rectangle bounds = getContentLimitedBorderEdge(c);
            if (bounds != null) {
                BorderPropertySet border = getBorder(c);
                RectPropertySet padding = getPadding(c);
                bounds.y += (int)border.top() + (int)padding.top();
                bounds.height -= (int)border.height() + (int)padding.height();
                return bounds;
            }
        }
       
        return super.getChildrenClipEdge(c);
View Full Code Here

Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet

            CollapsedBorderValue border1, CollapsedBorderValue border2) {
        return compareBorders(border1, border2, false);
    }
   
    private CollapsedBorderValue collapsedLeftBorder(CssContext c) {
        BorderPropertySet border = getStyle().getBorder(c);
        // For border left, we need to check, in order of precedence:
        // (1) Our left border.
        CollapsedBorderValue result = CollapsedBorderValue.borderLeft(border, BCELL);

        // (2) The previous cell's right border.
View Full Code Here

Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet

        return result;
    }
   
    private Rectangle getCollapsedBorderBounds(CssContext c) {
        BorderPropertySet border = getCollapsedPaintingBorder();
        Rectangle bounds = getPaintingBorderEdge(c);
        bounds.x -= (int) border.left() / 2;
        bounds.y -= (int) border.top() / 2;
        bounds.width += (int) border.left() / 2 + ((int) border.right() + 1) / 2;
        bounds.height += (int) border.top() / 2 + ((int) border.bottom() + 1) / 2;
       
        return bounds;
    }
View Full Code Here

Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet

            return -1;
        } else {
            int result = (int)getStyle().getFloatPropertyProportionalWidth(
                    CSSName.HEIGHT, getContainingBlock().getContentWidth(), c);
           
            BorderPropertySet border = getBorder(c);
            result -= (int)border.top() + (int)border.bottom();
           
            RectPropertySet padding = getPadding(c);
            result -= (int)padding.top() + (int)padding.bottom();
           
            return result >= 0 ? result : -1;
View Full Code Here

Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet

    public static final int TOP = 3;
    public static final int BOTTOM = 4;

    public int getMarginBorderPadding(
            CssContext cssCtx, int cbWidth, int which) {
        BorderPropertySet border = getBorder(cssCtx);
        RectPropertySet margin = getMarginRect(cbWidth, cssCtx);
        RectPropertySet padding = getPaddingRect(cbWidth, cssCtx);

        switch (which) {
            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

Examples of org.xhtmlrenderer.css.style.derived.BorderPropertySet

    protected void calcDimensions(LayoutContext c, int cssWidth) {
        if (! isDimensionsCalculated()) {
            CalculatedStyle style = getStyle();

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

            if (cssWidth != -1 && !isAnonymous() &&
                    (getStyle().isIdent(CSSName.MARGIN_LEFT, IdentValue.AUTO) ||
                            getStyle().isIdent(CSSName.MARGIN_RIGHT, IdentValue.AUTO)) &&
                    getStyle().isNeedAutoMarginResolution()) {
                resolveAutoMargins(c, cssWidth, padding, border);
            }

            recalcMargin(c);
            RectPropertySet margin = getMargin(c);

            // CLEAN: cast to int
            setLeftMBP((int) margin.left() + (int) border.left() + (int) padding.left());
            setRightMBP((int) padding.right() + (int) border.right() + (int) margin.right());
            if (c.isPrint() && getStyle().isDynamicAutoWidth()) {
                setContentWidth(calcEffPageRelativeWidth(c));
            } else {
                setContentWidth((getContainingBlockWidth() - getLeftMBP() - getRightMBP()));
            }
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.