- All Implemented Interfaces:
Serializable
,Comparable<CSSValue.Type>
,java.lang.constant.Constable
- Enclosing interface:
CSSValue
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptioncircle()
function (see CSS Shapes Level 1).Color.Color-Mix function.CSScounter()
function.CSScounters()
function.cubic-bezier()
easing function.Element reference.ellipse()
function (see CSS Shapes Level 1).Environment variable.An expression with algebraic syntax (i.e.Function.Gradient function.Identifier.image-set()
inherit
keyword.initial
keyword.inset()
function (see CSS Shapes Level 1).For this library's internal use.Invalid (non-primitive and non-keyword) value.Lexical value.linear()
easing function.Mathematical function (as defined by CSS Values and Units).Numeric type (excludescalc()
which is anEXPRESSION
).path()
function (see CSS Shapes Level 1).polygon()
function (see CSS Shapes Level 1).Ratio value.rect()
function.revert
keyword.shape()
function (see CSS Shapes Level 2).src()
function.steps()
easing function.String.Transform function (see CSS Transforms Module Level 1).Unicode character.Unicode range.Unicode wildcard.Unknown type, probably a system default or a compat value.unset
keyword.URI (url()
).xywh()
function (see CSS Shapes Level 1). -
Method Summary
Modifier and TypeMethodDescriptionstatic CSSValue.Type
Returns the enum constant of this class with the specified name.static CSSValue.Type[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
Unknown type, probably a system default or a compat value. -
INHERIT
inherit
keyword. -
INITIAL
initial
keyword. -
UNSET
unset
keyword. -
REVERT
revert
keyword. -
NUMERIC
Numeric type (excludescalc()
which is anEXPRESSION
).Cast to
CSSNumberValue
, althoughCSSTypedValue
orTypedValue
may give you what you need (like the numeric value viagetFloatValue
). If neither do, please look atNumberValue
. -
STRING
String.Casting to
CSSTypedValue
orTypedValue
will give you access to the string value viagetStringValue()
. -
IDENT
Identifier.Casting to
CSSTypedValue
orTypedValue
will give you access to the identifier value viagetStringValue()
. -
COLOR
Color.Casting to
CSSColorValue
orColorValue
provides methods likegetColorModel()
orgetColor()
(the latter provides the actual color as aCSSColor
).Once you retrieve the color, you can then use the indexed component access in
CSSColor.item(int)
, or cast it to a model sub-interface (likeRGBAColor
) according to the result ofgetColorModel()
. SeeColorModel
for details. -
COLOR_MIX
Color-Mix function.Cast to
CSSColorMixFunction
.getColor()
provides the interpolated color as aCSSColor
.Once you retrieve the color, you can then use the indexed component access in
CSSColor.item(int)
, or cast it to a model sub-interface (likeRGBAColor
) according to the result ofgetColorModel()
. SeeColorModel
for details. -
URI
URI (url()
).Casting to
CSSTypedValue
orTypedValue
will give you access to the URL value as a string, viagetStringValue()
and is probably all that you need.You could also cast to
URIValue
, which gives you a couple of convenience methods likeisEquivalent
orgetURLValue()
. -
SRC
src()
function.Cast to
CSSFunctionValue
orFunctionValue
. -
RECT
rect()
function.Cast to
CSSRectValue
orRectValue
. -
EXPRESSION
An expression with algebraic syntax (i.e.calc()
).See
CSSExpressionValue
. -
GRADIENT
Gradient function.Cast to
CSSGradientValue
. -
COUNTER
CSScounter()
function.See
CSSCounterValue
. -
COUNTERS
CSScounters()
function.See
CSSCountersValue
. -
CUBIC_BEZIER
cubic-bezier()
easing function.Cast to
CSSFunctionValue
. -
LINEAR
linear()
easing function.Cast to
CSSFunctionValue
. -
STEPS
steps()
easing function.Cast to
CSSFunctionValue
. -
FUNCTION
Function.Cast to
CSSFunctionValue
orFunctionValue
.Note: on functions,
CSSTypedValue.getStringValue()
must return the function name. -
MATH_FUNCTION
Mathematical function (as defined by CSS Values and Units).Cast to
CSSMathFunctionValue
.Note: on functions,
CSSTypedValue.getStringValue()
must return the function name. -
CIRCLE
-
ELLIPSE
-
INSET
-
PATH
-
POLYGON
-
SHAPE
-
XYWH
-
TRANSFORM_FUNCTION
Transform function (see CSS Transforms Module Level 1).Cast to
CSSTransformFunction
. -
UNICODE_RANGE
Unicode range. SeeCSSUnicodeRangeValue
. -
UNICODE_CHARACTER
Unicode character. SeeCSSUnicodeRangeValue.CSSUnicodeValue
. -
UNICODE_WILDCARD
Unicode wildcard. SeeCSSUnicodeRangeValue
. -
IMAGE_SET
image-set()
Cast to
CSSFunctionValue
. -
ELEMENT_REFERENCE
Element reference.Casting to
CSSTypedValue
orTypedValue
will give you access to the reference value viaCSSTypedValue.getStringValue()
. -
RATIO
Ratio value.Cast to
CSSRatioValue
orRatioValue
. -
ENV
Environment variable. SeeCSSEnvVariableValue
. -
LEXICAL
Lexical value.Cast to
CSSLexicalValue
orLexicalValue
. -
INTERNAL
For this library's internal use. -
INVALID
Invalid (non-primitive and non-keyword) value.The value is either a list or a shorthand.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-