All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface org.w3c.css.sac.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.


Variable Index

 o SAC_ATTR
Attribute: attr(...).
 o SAC_CENTIMETER
Absolute length cm.
 o SAC_COUNTER_FUNCTION
function counter.
 o SAC_COUNTERS_FUNCTION
function counters.
 o SAC_DEGREE
Angle deg.
 o SAC_DIMENSION
unknown dimension.
 o SAC_EM
Relative lengthem.
 o SAC_EX
Relative lengthex.
 o SAC_FUNCTION
unknown function.
 o SAC_GRADIAN
Angle grad.
 o SAC_HERTZ
Frequency Hz.
 o SAC_IDENT
any identifier except inherit.
 o SAC_INCH
Absolute length in.
 o SAC_INHERIT
identifier inherit.
 o SAC_INTEGER
Integers.
 o SAC_KILOHERTZ
Frequency kHz.
 o SAC_MILLIMETER
Absolute length mm.
 o SAC_MILLISECOND
Time ms.
 o SAC_OPERATOR_COMMA
,
 o SAC_OPERATOR_EXP
^
 o SAC_OPERATOR_GE
>=
 o SAC_OPERATOR_GT
>
 o SAC_OPERATOR_LE
<=
 o SAC_OPERATOR_LT
<
 o SAC_OPERATOR_MINUS
-
 o SAC_OPERATOR_MOD
%
 o SAC_OPERATOR_MULTIPLY
*
 o SAC_OPERATOR_PLUS
+
 o SAC_OPERATOR_SLASH
/
 o SAC_OPERATOR_TILDE
~
 o SAC_PERCENTAGE
Percentage.
 o SAC_PICA
Absolute length pc.
 o SAC_PIXEL
Relative length px.
 o SAC_POINT
Absolute length pt.
 o SAC_RADIAN
Angle rad.
 o SAC_REAL
reals.
 o SAC_RECT_FUNCTION
function rect.
 o SAC_RGBCOLOR
RGB Colors.
 o SAC_SECOND
Time s.
 o SAC_STRING_VALUE
A string.
 o SAC_SUB_EXPRESSION
sub expressions (a) (a + b) (normal/none)
 o SAC_UNICODERANGE
A unicode range.
 o SAC_URI
URI: uri(...).

Method Index

 o getDimensionUnitText()
Returns the string representation of the unit.
 o getFloatValue()
Returns the float value.
 o getFunctionName()
Returns the name of the function.
 o getIntegerValue()
Returns the integer value.
 o getLexicalUnitType()
An integer indicating the type of LexicalUnit.
 o getNextLexicalUnit()
Returns the next value or null if any.
 o getParameters()
The function parameters including operators (like the comma).
 o getPreviousLexicalUnit()
Returns the previous value or null if any.
 o getStringValue()
Returns the string value.
 o getSubValues()
Returns a list of values inside the sub expression.

Variables

 o SAC_OPERATOR_COMMA
 public static final short SAC_OPERATOR_COMMA
,

 o SAC_OPERATOR_PLUS
 public static final short SAC_OPERATOR_PLUS
+

 o SAC_OPERATOR_MINUS
 public static final short SAC_OPERATOR_MINUS
-

 o SAC_OPERATOR_MULTIPLY
 public static final short SAC_OPERATOR_MULTIPLY
*

 o SAC_OPERATOR_SLASH
 public static final short SAC_OPERATOR_SLASH
/

 o SAC_OPERATOR_MOD
 public static final short SAC_OPERATOR_MOD
%

 o SAC_OPERATOR_EXP
 public static final short SAC_OPERATOR_EXP
^

 o SAC_OPERATOR_LT
 public static final short SAC_OPERATOR_LT
<

 o SAC_OPERATOR_GT
 public static final short SAC_OPERATOR_GT
>

 o SAC_OPERATOR_LE
 public static final short SAC_OPERATOR_LE
<=

 o SAC_OPERATOR_GE
 public static final short SAC_OPERATOR_GE
>=

 o SAC_OPERATOR_TILDE
 public static final short SAC_OPERATOR_TILDE
~

 o SAC_INHERIT
 public static final short SAC_INHERIT
identifier inherit.

 o SAC_INTEGER
 public static final short SAC_INTEGER
Integers.

See Also:
getIntegerValue
 o SAC_REAL
 public static final short SAC_REAL
reals.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_EM
 public static final short SAC_EM
Relative lengthem.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_EX
 public static final short SAC_EX
Relative lengthex.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_PIXEL
 public static final short SAC_PIXEL
Relative length px.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_INCH
 public static final short SAC_INCH
Absolute length in.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_CENTIMETER
 public static final short SAC_CENTIMETER
Absolute length cm.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_MILLIMETER
 public static final short SAC_MILLIMETER
Absolute length mm.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_POINT
 public static final short SAC_POINT
Absolute length pt.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_PICA
 public static final short SAC_PICA
Absolute length pc.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_PERCENTAGE
 public static final short SAC_PERCENTAGE
Percentage.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_URI
 public static final short SAC_URI
URI: uri(...).

See Also:
getStringValue
 o SAC_COUNTER_FUNCTION
 public static final short SAC_COUNTER_FUNCTION
function counter.

See Also:
getFunctionName, getParameters
 o SAC_COUNTERS_FUNCTION
 public static final short SAC_COUNTERS_FUNCTION
function counters.

See Also:
getFunctionName, getParameters
 o SAC_RGBCOLOR
 public static final short SAC_RGBCOLOR
RGB Colors. rgb(0, 0, 0) and #000

See Also:
getFunctionName, getParameters
 o SAC_DEGREE
 public static final short SAC_DEGREE
Angle deg.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_GRADIAN
 public static final short SAC_GRADIAN
Angle grad.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_RADIAN
 public static final short SAC_RADIAN
Angle rad.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_MILLISECOND
 public static final short SAC_MILLISECOND
Time ms.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_SECOND
 public static final short SAC_SECOND
Time s.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_HERTZ
 public static final short SAC_HERTZ
Frequency Hz.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_KILOHERTZ
 public static final short SAC_KILOHERTZ
Frequency kHz.

See Also:
getFloatValue, getDimensionUnitText
 o SAC_IDENT
 public static final short SAC_IDENT
any identifier except inherit.

See Also:
getStringValue
 o SAC_STRING_VALUE
 public static final short SAC_STRING_VALUE
A string.

See Also:
getStringValue
 o SAC_ATTR
 public static final short SAC_ATTR
Attribute: attr(...).

See Also:
getStringValue
 o SAC_RECT_FUNCTION
 public static final short SAC_RECT_FUNCTION
function rect.

See Also:
getFunctionName, getParameters
 o SAC_UNICODERANGE
 public static final short SAC_UNICODERANGE
A unicode range. @@TO BE DEFINED

 o SAC_SUB_EXPRESSION
 public static final short SAC_SUB_EXPRESSION
sub expressions (a) (a + b) (normal/none)

See Also:
getSubValues
 o SAC_FUNCTION
 public static final short SAC_FUNCTION
unknown function.

See Also:
getFunctionName, getParameters
 o SAC_DIMENSION
 public static final short SAC_DIMENSION
unknown dimension.

See Also:
getFloatValue, getDimensionUnitText

Methods

 o getLexicalUnitType
 public abstract short getLexicalUnitType()
An integer indicating the type of LexicalUnit.

 o getNextLexicalUnit
 public abstract LexicalUnit getNextLexicalUnit()
Returns the next value or null if any.

 o getPreviousLexicalUnit
 public abstract LexicalUnit getPreviousLexicalUnit()
Returns the previous value or null if any.

 o getIntegerValue
 public abstract int getIntegerValue()
Returns the integer value.

See Also:
SAC_INTEGER
 o getFloatValue
 public abstract 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.

See Also:
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
 o getDimensionUnitText
 public abstract String getDimensionUnitText()
Returns the string representation of the unit.

if this lexical unit represents a float, the dimension is an empty string.

See Also:
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
 o getFunctionName
 public abstract String getFunctionName()
Returns the name of the function.

See Also:
SAC_COUNTER_FUNCTION, SAC_COUNTERS_FUNCTION, SAC_RECT_FUNCTION, SAC_FUNCTION, SAC_RGBCOLOR
 o getParameters
 public abstract LexicalUnit getParameters()
The function parameters including operators (like the comma). #000 is converted to rgb(0, 0, 0) can return null if SAC_FUNCTION.

See Also:
SAC_COUNTER_FUNCTION, SAC_COUNTERS_FUNCTION, SAC_RECT_FUNCTION, SAC_FUNCTION, SAC_RGBCOLOR
 o getStringValue
 public abstract String getStringValue()
Returns the string value.

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(....).

See Also:
SAC_URI, SAC_ATTR, SAC_IDENT, SAC_STRING_VALUE, SAC_UNICODERANGE
 o getSubValues
 public abstract LexicalUnit getSubValues()
Returns a list of values inside the sub expression.

See Also:
SAC_SUB_EXPRESSION

All Packages  Class Hierarchy  This Package  Previous  Next  Index