Package org.w3c.css.sac
Interface LexicalUnit
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: 477010 $
- Author:
- Philippe Le Hegaret
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortAttribute:attr(...).static final shortAbsolute lengthcm.static final shortfunctioncounter.static final shortfunctioncounters.static final shortAngledeg.static final shortunknown dimension.static final shortRelative lengthem.static final shortRelative lengthex.static final shortunknown function.static final shortAnglegrad.static final shortFrequencyHz.static final shortany identifier exceptinherit.static final shortAbsolute lengthin.static final shortidentifierinherit.static final shortIntegers.static final shortFrequencykHz.static final shortAbsolute lengthmm.static final shortTimems.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~static final shortPercentage.static final shortAbsolute lengthpc.static final shortRelative lengthpx.static final shortAbsolute lengthpt.static final shortAnglerad.static final shortreals.static final shortfunctionrect.static final shortRGB Colors.static final shortTimes.static final shortA string.static final shortsub expressions(a)(a + b)(normal/none)static final shortA unicode range.static final shortURI:uri(...). -
Method Summary
Modifier and TypeMethodDescriptionReturns the string representation of the unit.floatReturns the float value.Returns the name of the function.intReturns the integer value.shortAn integer indicating the type ofLexicalUnit.Returns the next value ornullif any.The function parameters including operators (like the comma).Returns the previous value ornullif 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.
-
-
Method Details
-
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:
-
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
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).#000is converted torgb(0, 0, 0)can returnnullifSAC_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:
-