Package org.w3c.dom.css

Examples of org.w3c.dom.css.Rect


            (CSSPrimitiveValue)decl.getPropertyCSSValueInternal
            (CSS_CLIP_PROPERTY);
        switch (clip.getPrimitiveType()) {
        case CSSPrimitiveValue.CSS_RECT:
            float [] off = new float[4];
            Rect r = clip.getRectValue();
            off[0] = r.getTop().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[1] = r.getRight().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[2] = r.getBottom().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[3] = r.getLeft().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            return off;
        case CSSPrimitiveValue.CSS_IDENT:
            return null; // 'auto' means no offsets
        default:
            throw new Error(); // can't be reached
View Full Code Here


            (CSSPrimitiveValue)decl.getPropertyCSSValueInternal
            (CSS_CLIP_PROPERTY);
        switch (clip.getPrimitiveType()) {
        case CSSPrimitiveValue.CSS_RECT:
            float [] off = new float[4];
            Rect r = clip.getRectValue();
            off[0] = r.getTop().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[1] = r.getRight().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[2] = r.getBottom().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[3] = r.getLeft().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            return off;
        case CSSPrimitiveValue.CSS_IDENT:
            return null; // 'auto' means no offsets
        default:
            throw new Error(); // can't be reached
View Full Code Here

        return parent.getPropertyName();
    }

    public Object getUpdatedChildObjectValueFromElement(Object requester,int requesterCode)
    {
        Rect current = (Rect)parent.getUpdatedChildObjectValueFromElement(this,getCode());
        if (current != this)
        {
            if (requesterCode == 0)
                return current.getTop();
            else if (requesterCode == 1)
                return current.getRight();
            else if (requesterCode == 2)
                return current.getBottom();
            else if (requesterCode == 3)
                return current.getLeft();
            throw new DOMException(DOMException.INVALID_ACCESS_ERR,"Internal Error");
        }
        else
            return requester;
    }
View Full Code Here

        borderWidth.setFloatValue(CSSPrimitiveValue.CSS_PX,(float)1.5); // Restaurar

        CSSValue clip = props.getPropertyCSSValue("clip");
        TestUtil.checkError(clip.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE);
        CSSPrimitiveValue clipValue = (CSSPrimitiveValue)clip;
        Rect clipRect = clipValue.getRectValue();
        CSSPrimitiveValue top = clipRect.getTop();
        TestUtil.checkError(top.getPrimitiveType() == CSSPrimitiveValue.CSS_PX);
        TestUtil.checkError(top.getFloatValue(CSSPrimitiveValue.CSS_PX) == 1);
        top.setFloatValue(CSSPrimitiveValue.CSS_IN,(float)3.5);
        TestUtil.checkError(top.getPrimitiveType() == CSSPrimitiveValue.CSS_IN);
        TestUtil.checkError(top.getFloatValue(CSSPrimitiveValue.CSS_IN) == 3.5);
View Full Code Here

            (CSSPrimitiveValue)decl.getPropertyCSSValueInternal
            (CSS_CLIP_PROPERTY);
        switch (clip.getPrimitiveType()) {
        case CSSPrimitiveValue.CSS_RECT:
            float [] off = new float[4];
            Rect r = clip.getRectValue();
            off[0] = r.getTop().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[1] = r.getRight().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[2] = r.getBottom().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[3] = r.getLeft().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            return off;
        case CSSPrimitiveValue.CSS_IDENT:
            return null; // 'auto' means no offsets
        default:
            throw new Error(); // can't be reached
View Full Code Here

            (CSSPrimitiveValue)decl.getPropertyCSSValueInternal
            (CSS_CLIP_PROPERTY);
        switch (clip.getPrimitiveType()) {
        case CSSPrimitiveValue.CSS_RECT:
            float [] off = new float[4];
            Rect r = clip.getRectValue();
            off[0] = r.getTop().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[1] = r.getRight().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[2] = r.getBottom().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            off[3] = r.getLeft().getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
            return off;
        case CSSPrimitiveValue.CSS_IDENT:
            return null; // 'auto' means no offsets
        default:
            throw new Error(); // can't be reached
View Full Code Here

TOP

Related Classes of org.w3c.dom.css.Rect

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.