Package org.w3c.css.sac
Interface LexicalUnit
-
public interface LexicalUnitThis 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: 477010 $
- Author:
- Philippe Le Hegaret
-
-
Field Summary
Fields Modifier and Type Field Description static shortSAC_ATTRAttribute:attr(...).static shortSAC_CENTIMETERAbsolute lengthcm.static shortSAC_COUNTER_FUNCTIONfunctioncounter.static shortSAC_COUNTERS_FUNCTIONfunctioncounters.static shortSAC_DEGREEAngledeg.static shortSAC_DIMENSIONunknown dimension.static shortSAC_EMRelative lengthem.static shortSAC_EXRelative lengthex.static shortSAC_FUNCTIONunknown function.static shortSAC_GRADIANAnglegrad.static shortSAC_HERTZFrequencyHz.static shortSAC_IDENTany identifier exceptinherit.static shortSAC_INCHAbsolute lengthin.static shortSAC_INHERITidentifierinherit.static shortSAC_INTEGERIntegers.static shortSAC_KILOHERTZFrequencykHz.static shortSAC_MILLIMETERAbsolute lengthmm.static shortSAC_MILLISECONDTimems.static shortSAC_OPERATOR_COMMA,static shortSAC_OPERATOR_EXP^static shortSAC_OPERATOR_GE>=static shortSAC_OPERATOR_GT>static shortSAC_OPERATOR_LE<=static shortSAC_OPERATOR_LT<static shortSAC_OPERATOR_MINUS-static shortSAC_OPERATOR_MOD%static shortSAC_OPERATOR_MULTIPLY*static shortSAC_OPERATOR_PLUS+static shortSAC_OPERATOR_SLASH/static shortSAC_OPERATOR_TILDE~static shortSAC_PERCENTAGEPercentage.static shortSAC_PICAAbsolute lengthpc.static shortSAC_PIXELRelative lengthpx.static shortSAC_POINTAbsolute lengthpt.static shortSAC_RADIANAnglerad.static shortSAC_REALreals.static shortSAC_RECT_FUNCTIONfunctionrect.static shortSAC_RGBCOLORRGB Colors.static shortSAC_SECONDTimes.static shortSAC_STRING_VALUEA string.static shortSAC_SUB_EXPRESSIONsub expressions(a)(a + b)(normal/none)static shortSAC_UNICODERANGEA unicode range.static shortSAC_URIURI:uri(...).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetDimensionUnitText()Returns the string representation of the unit.floatgetFloatValue()Returns the float value.java.lang.StringgetFunctionName()Returns the name of the function.intgetIntegerValue()Returns the integer value.shortgetLexicalUnitType()An integer indicating the type ofLexicalUnit.LexicalUnitgetNextLexicalUnit()Returns the next value ornullif any.LexicalUnitgetParameters()The function parameters including operators (like the comma).LexicalUnitgetPreviousLexicalUnit()Returns the previous value ornullif any.java.lang.StringgetStringValue()Returns the string value.LexicalUnitgetSubValues()Returns a list of values inside the sub expression.
-
-
-
Field Detail
-
SAC_OPERATOR_COMMA
static final short SAC_OPERATOR_COMMA
,- See Also:
- Constant Field Values
-
SAC_OPERATOR_PLUS
static final short SAC_OPERATOR_PLUS
+- See Also:
- Constant Field Values
-
SAC_OPERATOR_MINUS
static final short SAC_OPERATOR_MINUS
-- See Also:
- Constant Field Values
-
SAC_OPERATOR_MULTIPLY
static final short SAC_OPERATOR_MULTIPLY
*- See Also:
- Constant Field Values
-
SAC_OPERATOR_SLASH
static final short SAC_OPERATOR_SLASH
/- See Also:
- Constant Field Values
-
SAC_OPERATOR_MOD
static final short SAC_OPERATOR_MOD
%- See Also:
- Constant Field Values
-
SAC_OPERATOR_EXP
static final short SAC_OPERATOR_EXP
^- See Also:
- Constant Field Values
-
SAC_OPERATOR_LT
static final short SAC_OPERATOR_LT
<- See Also:
- Constant Field Values
-
SAC_OPERATOR_GT
static final short SAC_OPERATOR_GT
>- See Also:
- Constant Field Values
-
SAC_OPERATOR_LE
static final short SAC_OPERATOR_LE
<=- See Also:
- Constant Field Values
-
SAC_OPERATOR_GE
static final short SAC_OPERATOR_GE
>=- See Also:
- Constant Field Values
-
SAC_OPERATOR_TILDE
static final short SAC_OPERATOR_TILDE
~- See Also:
- Constant Field Values
-
SAC_INHERIT
static final short SAC_INHERIT
identifierinherit.- See Also:
- Constant Field Values
-
SAC_INTEGER
static final short SAC_INTEGER
Integers.- See Also:
getIntegerValue(), Constant Field Values
-
SAC_REAL
static final short SAC_REAL
reals.
-
SAC_EM
static final short SAC_EM
Relative lengthem.
-
SAC_EX
static final short SAC_EX
Relative lengthex.
-
SAC_PIXEL
static final short SAC_PIXEL
Relative lengthpx.
-
SAC_INCH
static final short SAC_INCH
Absolute lengthin.
-
SAC_CENTIMETER
static final short SAC_CENTIMETER
Absolute lengthcm.
-
SAC_MILLIMETER
static final short SAC_MILLIMETER
Absolute lengthmm.
-
SAC_POINT
static final short SAC_POINT
Absolute lengthpt.
-
SAC_PICA
static final short SAC_PICA
Absolute lengthpc.
-
SAC_PERCENTAGE
static final short SAC_PERCENTAGE
Percentage.
-
SAC_URI
static final short SAC_URI
URI:uri(...).- See Also:
getStringValue(), Constant Field Values
-
SAC_COUNTER_FUNCTION
static final short SAC_COUNTER_FUNCTION
functioncounter.- See Also:
getFunctionName(),getParameters(), Constant Field Values
-
SAC_COUNTERS_FUNCTION
static final short SAC_COUNTERS_FUNCTION
functioncounters.- See Also:
getFunctionName(),getParameters(), Constant Field Values
-
SAC_RGBCOLOR
static final short SAC_RGBCOLOR
RGB Colors.rgb(0, 0, 0)and#000- See Also:
getFunctionName(),getParameters(), Constant Field Values
-
SAC_DEGREE
static final short SAC_DEGREE
Angledeg.
-
SAC_GRADIAN
static final short SAC_GRADIAN
Anglegrad.
-
SAC_RADIAN
static final short SAC_RADIAN
Anglerad.
-
SAC_MILLISECOND
static final short SAC_MILLISECOND
Timems.
-
SAC_SECOND
static final short SAC_SECOND
Times.
-
SAC_HERTZ
static final short SAC_HERTZ
FrequencyHz.
-
SAC_KILOHERTZ
static final short SAC_KILOHERTZ
FrequencykHz.
-
SAC_IDENT
static final short SAC_IDENT
any identifier exceptinherit.- See Also:
getStringValue(), Constant Field Values
-
SAC_STRING_VALUE
static final short SAC_STRING_VALUE
A string.- See Also:
getStringValue(), Constant Field Values
-
SAC_ATTR
static final short SAC_ATTR
Attribute:attr(...).- See Also:
getStringValue(), Constant Field Values
-
SAC_RECT_FUNCTION
static final short SAC_RECT_FUNCTION
functionrect.- See Also:
getFunctionName(),getParameters(), Constant Field Values
-
SAC_UNICODERANGE
static final short SAC_UNICODERANGE
A unicode range. @@TO BE DEFINED- See Also:
- Constant Field Values
-
SAC_SUB_EXPRESSION
static final short SAC_SUB_EXPRESSION
sub expressions(a)(a + b)(normal/none)- See Also:
getSubValues(), Constant Field Values
-
SAC_FUNCTION
static final short SAC_FUNCTION
unknown function.- See Also:
getFunctionName(),getParameters(), Constant Field Values
-
SAC_DIMENSION
static final short SAC_DIMENSION
unknown dimension.
-
-
Method Detail
-
getLexicalUnitType
short getLexicalUnitType()
An integer indicating the type ofLexicalUnit.
-
getNextLexicalUnit
LexicalUnit getNextLexicalUnit()
Returns the next value ornullif any.
-
getPreviousLexicalUnit
LexicalUnit getPreviousLexicalUnit()
Returns the previous value ornullif any.
-
getIntegerValue
int getIntegerValue()
Returns the integer value.- See Also:
SAC_INTEGER
-
getFloatValue
float getFloatValue()
Returns the float value.If the type of
LexicalUnitis one of SAC_DEGREE, SAC_GRADIAN, SAC_RADIAN, SAC_MILLISECOND, SAC_SECOND, SAC_HERTZ or SAC_KILOHERTZ, the value can never be negative.
-
getDimensionUnitText
java.lang.String getDimensionUnitText()
Returns the string representation of the unit.if this lexical unit represents a float, the dimension is an empty string.
-
getFunctionName
java.lang.String getFunctionName()
Returns the name of the function.
-
getParameters
LexicalUnit getParameters()
The function parameters including operators (like the comma).#000is converted torgb(0, 0, 0)can returnnullifSAC_FUNCTION.
-
getStringValue
java.lang.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:
SAC_URI,SAC_ATTR,SAC_IDENT,SAC_STRING_VALUE,@@TO BE DEFINED
-
getSubValues
LexicalUnit getSubValues()
Returns a list of values inside the sub expression.- See Also:
SAC_SUB_EXPRESSION
-
-