Package org.w3c.css.sac
Interface LexicalUnit
- All Known Implementing Classes:
LexicalUnitImpl
public interface LexicalUnit
This is a lexical unit for CSS values.
Remarks: Not all the following lexical units are supported (or will be supported) by CSS.
All examples are CSS2 compliant.
- Version:
- $Revision: 1.5 $
- Author:
- Philippe Le Hegaret
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final short
Added to support filter: alpha(opacity=x)static final short
Attribute:attr(...)
.static final short
Absolute lengthcm
.static final short
functioncounter
.static final short
functioncounters
.static final short
Angledeg
.static final short
unknown dimension.static final short
Relative lengthem
.static final short
Relative lengthex
.static final short
unknown function.static final short
Anglegrad
.static final short
FrequencyHz
.static final short
any identifier exceptinherit
.static final short
Absolute lengthin
.static final short
identifierinherit
.static final short
Integers.static final short
FrequencykHz
.static final short
Absolute lengthmm
.static final short
Timems
.static final short
,static final short
Added to support filter: alpha(opacity=x)static final short
^static final short
>=static final short
>static final short
<=static final short
<static final short
-static final short
%static final short
*static final short
+static final short
/static final short
~static final short
Percentage.static final short
Absolute lengthpc
.static final short
Relative lengthpx
.static final short
Absolute lengthpt
.static final short
Anglerad
.static final short
reals.static final short
functionrect
.static final short
RGB Colors.static final short
Times
.static final short
A string.static final short
sub expressions(a)
(a + b)
(normal/none)
static final short
A unicode range.static final short
URI:uri(...)
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the string representation of the unit.float
Returns the float value.Returns the name of the function.int
Returns the integer value.short
An integer indicating the type ofLexicalUnit
.Returns the next value ornull
if any.The function parameters including operators (like the comma).Returns the previous value ornull
if any.Returns the string value.Returns a list of values inside the sub expression.
-
Field Details
-
SAC_OPERATOR_COMMA
static final short SAC_OPERATOR_COMMA,- See Also:
-
SAC_OPERATOR_PLUS
static final short SAC_OPERATOR_PLUS+- See Also:
-
SAC_OPERATOR_MINUS
static final short SAC_OPERATOR_MINUS-- See Also:
-
SAC_OPERATOR_MULTIPLY
static final short SAC_OPERATOR_MULTIPLY*- See Also:
-
SAC_OPERATOR_SLASH
static final short SAC_OPERATOR_SLASH/- See Also:
-
SAC_OPERATOR_MOD
static final short SAC_OPERATOR_MOD%- See Also:
-
SAC_OPERATOR_EXP
static final short SAC_OPERATOR_EXP^- See Also:
-
SAC_OPERATOR_LT
static final short SAC_OPERATOR_LT<- See Also:
-
SAC_OPERATOR_GT
static final short SAC_OPERATOR_GT>- See Also:
-
SAC_OPERATOR_LE
static final short SAC_OPERATOR_LE<=- See Also:
-
SAC_OPERATOR_GE
static final short SAC_OPERATOR_GE>=- See Also:
-
SAC_OPERATOR_TILDE
static final short SAC_OPERATOR_TILDE~- See Also:
-
SAC_INHERIT
static final short SAC_INHERITidentifierinherit
.- See Also:
-
SAC_INTEGER
static final short SAC_INTEGERIntegers.- See Also:
-
SAC_REAL
static final short SAC_REALreals. -
SAC_EM
static final short SAC_EMRelative lengthem
. -
SAC_EX
static final short SAC_EXRelative lengthex
. -
SAC_PIXEL
static final short SAC_PIXELRelative lengthpx
. -
SAC_INCH
static final short SAC_INCHAbsolute lengthin
. -
SAC_CENTIMETER
static final short SAC_CENTIMETERAbsolute lengthcm
. -
SAC_MILLIMETER
static final short SAC_MILLIMETERAbsolute lengthmm
. -
SAC_POINT
static final short SAC_POINTAbsolute lengthpt
. -
SAC_PICA
static final short SAC_PICAAbsolute lengthpc
. -
SAC_PERCENTAGE
static final short SAC_PERCENTAGEPercentage. -
SAC_URI
static final short SAC_URIURI:uri(...)
.- See Also:
-
SAC_COUNTER_FUNCTION
static final short SAC_COUNTER_FUNCTIONfunctioncounter
. -
SAC_COUNTERS_FUNCTION
static final short SAC_COUNTERS_FUNCTIONfunctioncounters
. -
SAC_RGBCOLOR
static final short SAC_RGBCOLORRGB Colors.rgb(0, 0, 0)
and#000
-
SAC_DEGREE
static final short SAC_DEGREEAngledeg
. -
SAC_GRADIAN
static final short SAC_GRADIANAnglegrad
. -
SAC_RADIAN
static final short SAC_RADIANAnglerad
. -
SAC_MILLISECOND
static final short SAC_MILLISECONDTimems
. -
SAC_SECOND
static final short SAC_SECONDTimes
. -
SAC_HERTZ
static final short SAC_HERTZFrequencyHz
. -
SAC_KILOHERTZ
static final short SAC_KILOHERTZFrequencykHz
. -
SAC_IDENT
static final short SAC_IDENTany identifier exceptinherit
.- See Also:
-
SAC_STRING_VALUE
static final short SAC_STRING_VALUEA string.- See Also:
-
SAC_ATTR
static final short SAC_ATTRAttribute:attr(...)
.- See Also:
-
SAC_RECT_FUNCTION
static final short SAC_RECT_FUNCTIONfunctionrect
. -
SAC_UNICODERANGE
static final short SAC_UNICODERANGEA unicode range. @@TO BE DEFINED- See Also:
-
SAC_SUB_EXPRESSION
static final short SAC_SUB_EXPRESSIONsub expressions(a)
(a + b)
(normal/none)
- See Also:
-
SAC_FUNCTION
static final short SAC_FUNCTIONunknown function. -
SAC_DIMENSION
static final short SAC_DIMENSIONunknown dimension. -
SAC_OPERATOR_EQUALS
static final short SAC_OPERATOR_EQUALSAdded to support filter: alpha(opacity=x)- See Also:
-
SAC_ALPHA_FUNCTION
static final short SAC_ALPHA_FUNCTIONAdded to support filter: alpha(opacity=x)- See Also:
-
-
Method Details
-
getLexicalUnitType
short getLexicalUnitType()An integer indicating the type ofLexicalUnit
. -
getNextLexicalUnit
LexicalUnit getNextLexicalUnit()Returns the next value ornull
if any. -
getPreviousLexicalUnit
LexicalUnit getPreviousLexicalUnit()Returns the previous value ornull
if any. -
getIntegerValue
int getIntegerValue()Returns the integer value.- See Also:
-
getFloatValue
float getFloatValue()Returns the float value.If the type of
LexicalUnit
is one of SAC_DEGREE, SAC_GRADIAN, SAC_RADIAN, SAC_MILLISECOND, SAC_SECOND, SAC_HERTZ or SAC_KILOHERTZ, the value can never be negative. -
getDimensionUnitText
String getDimensionUnitText()Returns the string representation of the unit.if this lexical unit represents a float, the dimension is an empty string.
-
getFunctionName
String getFunctionName()Returns the name of the function. -
getParameters
LexicalUnit getParameters()The function parameters including operators (like the comma).#000
is converted torgb(0, 0, 0)
can returnnull
ifSAC_FUNCTION
. -
getStringValue
String getStringValue()Returns the string value.If the type is
SAC_URI
, the return value doesn't containuri(....)
or quotes.If the type is
SAC_ATTR
, the return value doesn't containattr(....)
.- See Also:
-
getSubValues
LexicalUnit getSubValues()Returns a list of values inside the sub expression.- See Also:
-