Interface CSSPrimitiveValue2

All Superinterfaces:
CSSPrimitiveValue, CSSValue
All Known Subinterfaces:
CSSAttrValue, CSSCountersValue, CSSCounterValue, CSSCustomPropertyValue, CSSEnvVariableValue, CSSExpressionValue, CSSFunctionValue, CSSGradientValue, CSSRatioValue, CSSUnicodeRangeValue, CSSUnicodeRangeValue.CSSUnicodeValue, ExtendedCSSPrimitiveValue
All Known Implementing Classes:
AttrValue, CalcValue, ColorValue, CustomPropertyValue, EnvVariableValue, ExpressionValue, FunctionValue, GradientValue, IdentifierValue, NumberValue, PercentageValue, PrimitiveValue, RatioValue, StringValue, SystemDefaultValue, UnicodeRangeValue, UnicodeValue, UnicodeWildcardValue, UnknownValue, URIValue, URIValueWrapper

public interface CSSPrimitiveValue2 extends CSSPrimitiveValue
Adds new methods and assigned units to W3C's CSSPrimitiveValue.
  • Field Details

    • CSS_CAP

      static final short CSS_CAP
      The value is a font-relative length (cap). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_CH

      static final short CSS_CH
      The value is a font-relative length (ch). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_IC

      static final short CSS_IC
      The value is a font-relative length (ic). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_LH

      static final short CSS_LH
      The value is a font-relative length (lh). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_QUARTER_MM

      static final short CSS_QUARTER_MM
      The value is a length (Q). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_REM

      static final short CSS_REM
      The value is a font-relative length (rem). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_RLH

      static final short CSS_RLH
      The value is a font-relative length (rlh). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_TURN

      static final short CSS_TURN
      The value is an angle (turn). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_VB

      static final short CSS_VB
      The value is a viewport-percentage length (vb). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_VH

      static final short CSS_VH
      The value is a viewport-percentage length (vh). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_VI

      static final short CSS_VI
      The value is a viewport-percentage length (vi). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_VMAX

      static final short CSS_VMAX
      The value is a viewport-percentage length (vmax). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_VMIN

      static final short CSS_VMIN
      The value is a viewport-percentage length (vmin). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_VW

      static final short CSS_VW
      The value is a viewport-percentage length (vw). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_DPI

      static final short CSS_DPI
      The value is a resolution (dpi). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_DPCM

      static final short CSS_DPCM
      The value is a resolution (dpcm). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_DPPX

      static final short CSS_DPPX
      The value is a resolution (dppx). The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_FR

      static final short CSS_FR
      The value is a flexible length (fr). Note that it is not a length. The value can be obtained by using the getFloatValue method.
      See Also:
    • CSS_EXPRESSION

      static final short CSS_EXPRESSION
      An expression with algebraic syntax (i.e. calc()).

      See CSSExpressionValue.

      See Also:
    • CSS_GRADIENT

      static final short CSS_GRADIENT
      Gradient function.
      See Also:
    • CSS_FUNCTION

      static final short CSS_FUNCTION
      Function. See CSSFunctionValue.

      On functions, CSSPrimitiveValue.getStringValue() must return the function name.

      See Also:
    • CSS_CUSTOM_PROPERTY

      static final short CSS_CUSTOM_PROPERTY
      Custom property. See CSSCustomPropertyValue.

      On custom property values, CSSPrimitiveValue.getStringValue() must return the custom property name.

      See Also:
    • CSS_ENV_VAR

      static final short CSS_ENV_VAR
      environment variable. See CSSEnvVariableValue.

      On environment variable values, CSSPrimitiveValue.getStringValue() must return the environment variable name.

      See Also:
    • CSS_UNICODE_RANGE

      static final short CSS_UNICODE_RANGE
      Unicode range. See CSSUnicodeRangeValue.
      See Also:
    • CSS_UNICODE_CHARACTER

      static final short CSS_UNICODE_CHARACTER
      Unicode character. See CSSUnicodeRangeValue.CSSUnicodeValue.
      See Also:
    • CSS_UNICODE_WILDCARD

      static final short CSS_UNICODE_WILDCARD
      Unicode wildcard. See CSSUnicodeRangeValue.
      See Also:
    • CSS_ELEMENT_REFERENCE

      static final short CSS_ELEMENT_REFERENCE
      Element reference.
      See Also:
    • CSS_COUNTERS

      static final short CSS_COUNTERS
      CSS counters() function.

      See CSSCountersValue.

      See Also:
    • CSS_RATIO

      static final short CSS_RATIO
      CSS ratio value (media queries).
      See Also:
  • Method Details

    • getRGBColorValue

      RGBAColor getRGBColorValue() throws DOMException
      Get the RGBA color. If this CSS value doesn't contain a RGB color value, a DOMException is raised.
      Specified by:
      getRGBColorValue in interface CSSPrimitiveValue
      Returns:
      the RGBA color value.
      Throws:
      DOMException - INVALID_ACCESS_ERR: Raised if the attached property can't return a RGB color value (e.g. this is not CSS_RGBCOLOR).
    • isCalculatedNumber

      boolean isCalculatedNumber()
      Test whether this is a numeric value that was the result of a calc() expression.
      Returns:
      true if this is a numeric value, and it was produced as the output of a calculation (instead of declared as a plain, constant numeric value).
    • isNegativeNumber

      boolean isNegativeNumber()
      Test whether this is a numeric value that is less than zero.
      Returns:
      true if this is a numeric value and its value is negative.