Class CSSOMValue

  • All Implemented Interfaces:
    org.w3c.dom.css.Counter, org.w3c.dom.css.CSSPrimitiveValue, org.w3c.dom.css.CSSValue, org.w3c.dom.css.CSSValueList, org.w3c.dom.css.Rect, org.w3c.dom.css.RGBColor
    Direct Known Subclasses:
    CSSOMComputedStyle.ComputedCSSValue, CSSOMStyleDeclaration.StyleDeclarationValue, SVGStylableElement.PresentationAttributeValue

    public class CSSOMValue
    extends java.lang.Object
    implements org.w3c.dom.css.CSSPrimitiveValue, org.w3c.dom.css.CSSValueList, org.w3c.dom.css.Counter, org.w3c.dom.css.Rect, org.w3c.dom.css.RGBColor
    This class implements the CSSValue, CSSPrimitiveValue, CSSValueList interfaces.
    Version:
    $Id: CSSOMValue.java 1831635 2018-05-15 13:33:47Z ssteiner $
    • Method Detail

      • getCssText

        public java.lang.String getCssText()
        DOM: Implements CSSValue.getCssText().
        Specified by:
        getCssText in interface org.w3c.dom.css.CSSValue
      • setCssText

        public void setCssText​(java.lang.String cssText)
                        throws org.w3c.dom.DOMException
        DOM: Implements CSSValue.setCssText(String).
        Specified by:
        setCssText in interface org.w3c.dom.css.CSSValue
        Throws:
        org.w3c.dom.DOMException
      • getCssValueType

        public short getCssValueType()
        DOM: Implements CSSValue.getCssValueType().
        Specified by:
        getCssValueType in interface org.w3c.dom.css.CSSValue
      • getPrimitiveType

        public short getPrimitiveType()
        DOM: Implements CSSPrimitiveValue.getPrimitiveType().
        Specified by:
        getPrimitiveType in interface org.w3c.dom.css.CSSPrimitiveValue
      • setFloatValue

        public void setFloatValue​(short unitType,
                                  float floatValue)
                           throws org.w3c.dom.DOMException
        DOM: Implements CSSPrimitiveValue.setFloatValue(short,float).
        Specified by:
        setFloatValue in interface org.w3c.dom.css.CSSPrimitiveValue
        Throws:
        org.w3c.dom.DOMException
      • getFloatValue

        public float getFloatValue​(short unitType)
                            throws org.w3c.dom.DOMException
        DOM: Implements CSSPrimitiveValue.getFloatValue(short).
        Specified by:
        getFloatValue in interface org.w3c.dom.css.CSSPrimitiveValue
        Throws:
        org.w3c.dom.DOMException
      • convertFloatValue

        public static float convertFloatValue​(short unitType,
                                              Value value)
        Converts the actual float value to the given unit type.
      • toCentimeters

        protected static float toCentimeters​(Value value)
        Converts the current value into centimeters.
      • toInches

        protected static float toInches​(Value value)
        Converts the current value into inches.
      • toMillimeters

        protected static float toMillimeters​(Value value)
        Converts the current value into millimeters.
      • toPoints

        protected static float toPoints​(Value value)
        Converts the current value into points.
      • toPicas

        protected static float toPicas​(Value value)
        Converts the current value into picas.
      • toDegrees

        protected static float toDegrees​(Value value)
        Converts the current value into degrees.
      • toRadians

        protected static float toRadians​(Value value)
        Converts the current value into radians.
      • toGradians

        protected static float toGradians​(Value value)
        Converts the current value into gradians.
      • toMilliseconds

        protected static float toMilliseconds​(Value value)
        Converts the current value into milliseconds.
      • toSeconds

        protected static float toSeconds​(Value value)
        Converts the current value into seconds.
      • toHertz

        protected static float toHertz​(Value value)
        Converts the current value into Hertz.
      • tokHertz

        protected static float tokHertz​(Value value)
        Converts the current value into kHertz.
      • setStringValue

        public void setStringValue​(short stringType,
                                   java.lang.String stringValue)
                            throws org.w3c.dom.DOMException
        DOM: Implements CSSPrimitiveValue.setStringValue(short,String).
        Specified by:
        setStringValue in interface org.w3c.dom.css.CSSPrimitiveValue
        Throws:
        org.w3c.dom.DOMException
      • getStringValue

        public java.lang.String getStringValue()
                                        throws org.w3c.dom.DOMException
        DOM: Implements CSSPrimitiveValue.getStringValue().
        Specified by:
        getStringValue in interface org.w3c.dom.css.CSSPrimitiveValue
        Throws:
        org.w3c.dom.DOMException
      • getCounterValue

        public org.w3c.dom.css.Counter getCounterValue()
                                                throws org.w3c.dom.DOMException
        DOM: Implements CSSPrimitiveValue.getCounterValue().
        Specified by:
        getCounterValue in interface org.w3c.dom.css.CSSPrimitiveValue
        Throws:
        org.w3c.dom.DOMException
      • getRectValue

        public org.w3c.dom.css.Rect getRectValue()
                                          throws org.w3c.dom.DOMException
        DOM: Implements CSSPrimitiveValue.getRectValue().
        Specified by:
        getRectValue in interface org.w3c.dom.css.CSSPrimitiveValue
        Throws:
        org.w3c.dom.DOMException
      • getRGBColorValue

        public org.w3c.dom.css.RGBColor getRGBColorValue()
                                                  throws org.w3c.dom.DOMException
        DOM: Implements CSSPrimitiveValue.getRGBColorValue().
        Specified by:
        getRGBColorValue in interface org.w3c.dom.css.CSSPrimitiveValue
        Throws:
        org.w3c.dom.DOMException
      • getLength

        public int getLength()
        DOM: Implements CSSValueList.getLength().
        Specified by:
        getLength in interface org.w3c.dom.css.CSSValueList
      • item

        public org.w3c.dom.css.CSSValue item​(int index)
        DOM: Implements CSSValueList.item(int).
        Specified by:
        item in interface org.w3c.dom.css.CSSValueList
      • getIdentifier

        public java.lang.String getIdentifier()
        DOM: Implements Counter.getIdentifier().
        Specified by:
        getIdentifier in interface org.w3c.dom.css.Counter
      • getListStyle

        public java.lang.String getListStyle()
        DOM: Implements Counter.getListStyle().
        Specified by:
        getListStyle in interface org.w3c.dom.css.Counter
      • getSeparator

        public java.lang.String getSeparator()
        DOM: Implements Counter.getSeparator().
        Specified by:
        getSeparator in interface org.w3c.dom.css.Counter
      • getTop

        public org.w3c.dom.css.CSSPrimitiveValue getTop()
        DOM: Implements Rect.getTop().
        Specified by:
        getTop in interface org.w3c.dom.css.Rect
      • getRight

        public org.w3c.dom.css.CSSPrimitiveValue getRight()
        DOM: Implements Rect.getRight().
        Specified by:
        getRight in interface org.w3c.dom.css.Rect
      • getBottom

        public org.w3c.dom.css.CSSPrimitiveValue getBottom()
        DOM: Implements Rect.getBottom().
        Specified by:
        getBottom in interface org.w3c.dom.css.Rect
      • getLeft

        public org.w3c.dom.css.CSSPrimitiveValue getLeft()
        DOM: Implements Rect.getLeft().
        Specified by:
        getLeft in interface org.w3c.dom.css.Rect
      • getRed

        public org.w3c.dom.css.CSSPrimitiveValue getRed()
        DOM: Implements RGBColor.getRed().
        Specified by:
        getRed in interface org.w3c.dom.css.RGBColor
      • getGreen

        public org.w3c.dom.css.CSSPrimitiveValue getGreen()
        DOM: Implements RGBColor.getGreen().
        Specified by:
        getGreen in interface org.w3c.dom.css.RGBColor
      • getBlue

        public org.w3c.dom.css.CSSPrimitiveValue getBlue()
        DOM: Implements RGBColor.getBlue().
        Specified by:
        getBlue in interface org.w3c.dom.css.RGBColor