|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Field Summary | |
---|---|
static short |
SAC_ATTR
Attribute: attr(...) . |
static short |
SAC_CENTIMETER
Absolute length cm . |
static short |
SAC_COUNTER_FUNCTION
function counter . |
static short |
SAC_COUNTERS_FUNCTION
function counters . |
static short |
SAC_DEGREE
Angle deg . |
static short |
SAC_DIMENSION
unknown dimension. |
static short |
SAC_EM
Relative length em . |
static short |
SAC_EX
Relative length ex . |
static short |
SAC_FUNCTION
unknown function. |
static short |
SAC_GRADIAN
Angle grad . |
static short |
SAC_HERTZ
Frequency Hz . |
static short |
SAC_IDENT
any identifier except inherit . |
static short |
SAC_INCH
Absolute length in . |
static short |
SAC_INHERIT
identifier inherit . |
static short |
SAC_INTEGER
Integers. |
static short |
SAC_KILOHERTZ
Frequency kHz . |
static short |
SAC_MILLIMETER
Absolute length mm . |
static short |
SAC_MILLISECOND
Time ms . |
static short |
SAC_OPERATOR_COMMA
, |
static short |
SAC_OPERATOR_EXP
^ |
static short |
SAC_OPERATOR_GE
>= |
static short |
SAC_OPERATOR_GT
> |
static short |
SAC_OPERATOR_LE
<= |
static short |
SAC_OPERATOR_LT
< |
static short |
SAC_OPERATOR_MINUS
- |
static short |
SAC_OPERATOR_MOD
% |
static short |
SAC_OPERATOR_MULTIPLY
* |
static short |
SAC_OPERATOR_PLUS
+ |
static short |
SAC_OPERATOR_SLASH
/ |
static short |
SAC_OPERATOR_TILDE
~ |
static short |
SAC_PERCENTAGE
Percentage. |
static short |
SAC_PICA
Absolute length pc . |
static short |
SAC_PIXEL
Relative length px . |
static short |
SAC_POINT
Absolute length pt . |
static short |
SAC_RADIAN
Angle rad . |
static short |
SAC_REAL
reals. |
static short |
SAC_RECT_FUNCTION
function rect . |
static short |
SAC_RGBCOLOR
RGB Colors. |
static short |
SAC_SECOND
Time s . |
static short |
SAC_STRING_VALUE
A string. |
static short |
SAC_SUB_EXPRESSION
sub expressions (a) (a + b) (normal/none) |
static short |
SAC_UNICODERANGE
A unicode range. |
static short |
SAC_URI
URI: uri(...) . |
Method Summary | |
---|---|
java.lang.String |
getDimensionUnitText()
Returns the string representation of the unit. |
float |
getFloatValue()
Returns the float value. |
java.lang.String |
getFunctionName()
Returns the name of the function. |
int |
getIntegerValue()
Returns the integer value. |
short |
getLexicalUnitType()
An integer indicating the type of LexicalUnit . |
LexicalUnit |
getNextLexicalUnit()
Returns the next value or null if any. |
LexicalUnit |
getParameters()
The function parameters including operators (like the comma). |
LexicalUnit |
getPreviousLexicalUnit()
Returns the previous value or null if any. |
java.lang.String |
getStringValue()
Returns the string value. |
LexicalUnit |
getSubValues()
Returns a list of values inside the sub expression. |
Field Detail |
---|
static final short SAC_OPERATOR_COMMA
static final short SAC_OPERATOR_PLUS
static final short SAC_OPERATOR_MINUS
static final short SAC_OPERATOR_MULTIPLY
static final short SAC_OPERATOR_SLASH
static final short SAC_OPERATOR_MOD
static final short SAC_OPERATOR_EXP
static final short SAC_OPERATOR_LT
static final short SAC_OPERATOR_GT
static final short SAC_OPERATOR_LE
static final short SAC_OPERATOR_GE
static final short SAC_OPERATOR_TILDE
static final short SAC_INHERIT
inherit
.
static final short SAC_INTEGER
getIntegerValue()
,
Constant Field Valuesstatic final short SAC_REAL
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_EM
em
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_EX
ex
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_PIXEL
px
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_INCH
in
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_CENTIMETER
cm
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_MILLIMETER
mm
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_POINT
pt
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_PICA
pc
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_PERCENTAGE
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_URI
uri(...)
.
getStringValue()
,
Constant Field Valuesstatic final short SAC_COUNTER_FUNCTION
counter
.
getFunctionName()
,
getParameters()
,
Constant Field Valuesstatic final short SAC_COUNTERS_FUNCTION
counters
.
getFunctionName()
,
getParameters()
,
Constant Field Valuesstatic final short SAC_RGBCOLOR
rgb(0, 0, 0)
and #000
getFunctionName()
,
getParameters()
,
Constant Field Valuesstatic final short SAC_DEGREE
deg
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_GRADIAN
grad
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_RADIAN
rad
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_MILLISECOND
ms
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_SECOND
s
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_HERTZ
Hz
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_KILOHERTZ
kHz
.
getFloatValue()
,
getDimensionUnitText()
,
Constant Field Valuesstatic final short SAC_IDENT
inherit
.
getStringValue()
,
Constant Field Valuesstatic final short SAC_STRING_VALUE
getStringValue()
,
Constant Field Valuesstatic final short SAC_ATTR
attr(...)
.
getStringValue()
,
Constant Field Valuesstatic final short SAC_RECT_FUNCTION
rect
.
getFunctionName()
,
getParameters()
,
Constant Field Valuesstatic final short SAC_UNICODERANGE
static final short SAC_SUB_EXPRESSION
(a)
(a + b)
(normal/none)
getSubValues()
,
Constant Field Valuesstatic final short SAC_FUNCTION
getFunctionName()
,
getParameters()
,
Constant Field Valuesstatic final short SAC_DIMENSION
getFloatValue()
,
getDimensionUnitText()
,
Constant Field ValuesMethod Detail |
---|
short getLexicalUnitType()
LexicalUnit
.
LexicalUnit getNextLexicalUnit()
null
if any.
LexicalUnit getPreviousLexicalUnit()
null
if any.
int getIntegerValue()
SAC_INTEGER
float getFloatValue()
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.
SAC_REAL
,
SAC_DIMENSION
,
SAC_EM
,
SAC_EX
,
SAC_PIXEL
,
SAC_INCH
,
SAC_CENTIMETER
,
SAC_MILLIMETER
,
SAC_POINT
,
SAC_PICA
,
SAC_PERCENTAGE
,
SAC_DEGREE
,
SAC_GRADIAN
,
SAC_RADIAN
,
SAC_MILLISECOND
,
SAC_SECOND
,
SAC_HERTZ
,
SAC_KILOHERTZ
java.lang.String getDimensionUnitText()
if this lexical unit represents a float, the dimension is an empty string.
SAC_REAL
,
SAC_DIMENSION
,
SAC_EM
,
SAC_EX
,
SAC_PIXEL
,
SAC_INCH
,
SAC_CENTIMETER
,
SAC_MILLIMETER
,
SAC_POINT
,
SAC_PICA
,
SAC_PERCENTAGE
,
SAC_DEGREE
,
SAC_GRADIAN
,
SAC_RADIAN
,
SAC_MILLISECOND
,
SAC_SECOND
,
SAC_HERTZ
,
SAC_KILOHERTZ
java.lang.String getFunctionName()
SAC_COUNTER_FUNCTION
,
SAC_COUNTERS_FUNCTION
,
SAC_RECT_FUNCTION
,
SAC_FUNCTION
,
SAC_RGBCOLOR
LexicalUnit getParameters()
#000
is converted to rgb(0, 0, 0)
can return null
if SAC_FUNCTION
.
SAC_COUNTER_FUNCTION
,
SAC_COUNTERS_FUNCTION
,
SAC_RECT_FUNCTION
,
SAC_FUNCTION
,
SAC_RGBCOLOR
java.lang.String getStringValue()
If the type is SAC_URI
, the return value doesn't contain
uri(....)
or quotes.
If the type is SAC_ATTR
, the return value doesn't contain
attr(....)
.
SAC_URI
,
SAC_ATTR
,
SAC_IDENT
,
SAC_STRING_VALUE
,
@@TO BE DEFINED
LexicalUnit getSubValues()
SAC_SUB_EXPRESSION
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |