- 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
Adds new methods and assigned units to W3C's
CSSPrimitiveValue
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
The value is a font-relative length (cap).static final short
The value is a font-relative length (ch).static final short
CSScounters()
function.static final short
Custom property.static final short
The value is a resolution (dpcm).static final short
The value is a resolution (dpi).static final short
The value is a resolution (dppx).static final short
Element reference.static final short
environment variable.static final short
An expression with algebraic syntax (i.e.static final short
The value is a flexible length (fr).static final short
Function.static final short
Gradient function.static final short
The value is a font-relative length (ic).static final short
The value is a font-relative length (lh).static final short
The value is a length (Q).static final short
CSS ratio value (media queries).static final short
The value is a font-relative length (rem).static final short
The value is a font-relative length (rlh).static final short
The value is an angle (turn).static final short
Unicode character.static final short
Unicode range.static final short
Unicode wildcard.static final short
The value is a viewport-percentage length (vb).static final short
The value is a viewport-percentage length (vh).static final short
The value is a viewport-percentage length (vi).static final short
The value is a viewport-percentage length (vmax).static final short
The value is a viewport-percentage length (vmin).static final short
The value is a viewport-percentage length (vw).Fields inherited from interface org.w3c.dom.css.CSSPrimitiveValue
CSS_ATTR, CSS_CM, CSS_COUNTER, CSS_DEG, CSS_DIMENSION, CSS_EMS, CSS_EXS, CSS_GRAD, CSS_HZ, CSS_IDENT, CSS_IN, CSS_KHZ, CSS_MM, CSS_MS, CSS_NUMBER, CSS_PC, CSS_PERCENTAGE, CSS_PT, CSS_PX, CSS_RAD, CSS_RECT, CSS_RGBCOLOR, CSS_S, CSS_STRING, CSS_UNKNOWN, CSS_URI
Fields inherited from interface org.w3c.dom.css.CSSValue
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST
-
Method Summary
Modifier and TypeMethodDescriptionGet the RGBA color.boolean
Test whether this is a numeric value that was the result of acalc()
expression.boolean
Test whether this is a numeric value that is less than zero.Methods inherited from interface org.w3c.dom.css.CSSPrimitiveValue
getCounterValue, getFloatValue, getPrimitiveType, getRectValue, getStringValue, setFloatValue, setStringValue
Methods inherited from interface org.w3c.dom.css.CSSValue
getCssText, getCssValueType, setCssText
-
Field Details
-
CSS_CAP
static final short CSS_CAPThe value is a font-relative length (cap). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_CH
static final short CSS_CHThe value is a font-relative length (ch). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_IC
static final short CSS_ICThe value is a font-relative length (ic). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_LH
static final short CSS_LHThe value is a font-relative length (lh). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_QUARTER_MM
static final short CSS_QUARTER_MMThe value is a length (Q). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_REM
static final short CSS_REMThe value is a font-relative length (rem). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_RLH
static final short CSS_RLHThe value is a font-relative length (rlh). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_TURN
static final short CSS_TURNThe value is an angle (turn). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_VB
static final short CSS_VBThe value is a viewport-percentage length (vb). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_VH
static final short CSS_VHThe value is a viewport-percentage length (vh). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_VI
static final short CSS_VIThe value is a viewport-percentage length (vi). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_VMAX
static final short CSS_VMAXThe value is a viewport-percentage length (vmax). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_VMIN
static final short CSS_VMINThe value is a viewport-percentage length (vmin). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_VW
static final short CSS_VWThe value is a viewport-percentage length (vw). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_DPI
static final short CSS_DPIThe value is a resolution (dpi). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_DPCM
static final short CSS_DPCMThe value is a resolution (dpcm). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_DPPX
static final short CSS_DPPXThe value is a resolution (dppx). The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_FR
static final short CSS_FRThe value is a flexible length (fr). Note that it is not a length. The value can be obtained by using thegetFloatValue
method.- See Also:
-
CSS_EXPRESSION
static final short CSS_EXPRESSIONAn expression with algebraic syntax (i.e.calc()
).See
CSSExpressionValue
.- See Also:
-
CSS_GRADIENT
static final short CSS_GRADIENTGradient function.- See Also:
-
CSS_FUNCTION
static final short CSS_FUNCTIONFunction. SeeCSSFunctionValue
.On functions,
CSSPrimitiveValue.getStringValue()
must return the function name.- See Also:
-
CSS_CUSTOM_PROPERTY
static final short CSS_CUSTOM_PROPERTYCustom property. SeeCSSCustomPropertyValue
.On custom property values,
CSSPrimitiveValue.getStringValue()
must return the custom property name.- See Also:
-
CSS_ENV_VAR
static final short CSS_ENV_VARenvironment variable. SeeCSSEnvVariableValue
.On environment variable values,
CSSPrimitiveValue.getStringValue()
must return the environment variable name.- See Also:
-
CSS_UNICODE_RANGE
static final short CSS_UNICODE_RANGEUnicode range. SeeCSSUnicodeRangeValue
.- See Also:
-
CSS_UNICODE_CHARACTER
static final short CSS_UNICODE_CHARACTERUnicode character. SeeCSSUnicodeRangeValue.CSSUnicodeValue
.- See Also:
-
CSS_UNICODE_WILDCARD
static final short CSS_UNICODE_WILDCARDUnicode wildcard. SeeCSSUnicodeRangeValue
.- See Also:
-
CSS_ELEMENT_REFERENCE
static final short CSS_ELEMENT_REFERENCEElement reference.- See Also:
-
CSS_COUNTERS
static final short CSS_COUNTERSCSScounters()
function.See
CSSCountersValue
.- See Also:
-
CSS_RATIO
static final short CSS_RATIOCSS ratio value (media queries).- See Also:
-
-
Method Details
-
getRGBColorValue
Get the RGBA color. If this CSS value doesn't contain a RGB color value, aDOMException
is raised.- Specified by:
getRGBColorValue
in interfaceCSSPrimitiveValue
- 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 notCSS_RGBCOLOR
).
-
isCalculatedNumber
boolean isCalculatedNumber()Test whether this is a numeric value that was the result of acalc()
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.
-