Home » xml-commons-external-1.4.01-src » org.w3c.css.sac » [javadoc | source]
org.w3c.css.sac
public interface: LexicalUnit [javadoc | source] 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
public static final  short SAC_OPERATOR_COMMA   
public static final  short SAC_OPERATOR_PLUS   
public static final  short SAC_OPERATOR_MINUS   
public static final  short SAC_OPERATOR_MULTIPLY   
public static final  short SAC_OPERATOR_SLASH   
public static final  short SAC_OPERATOR_MOD   
public static final  short SAC_OPERATOR_EXP   
public static final  short SAC_OPERATOR_LT   
public static final  short SAC_OPERATOR_GT   
public static final  short SAC_OPERATOR_LE    <= 
public static final  short SAC_OPERATOR_GE    >= 
public static final  short SAC_OPERATOR_TILDE   
public static final  short SAC_INHERIT    identifier inherit
public static final  short SAC_INTEGER    Integers. 
public static final  short SAC_REAL    reals. 
public static final  short SAC_EM    Relative lengthem. 
public static final  short SAC_EX    Relative lengthex. 
public static final  short SAC_PIXEL    Relative length px. 
public static final  short SAC_INCH    Absolute length in. 
public static final  short SAC_CENTIMETER    Absolute length cm. 
public static final  short SAC_MILLIMETER    Absolute length mm. 
public static final  short SAC_POINT    Absolute length pt. 
public static final  short SAC_PICA    Absolute length pc. 
public static final  short SAC_PERCENTAGE    Percentage. 
public static final  short SAC_URI    URI: uri(...). 
public static final  short SAC_COUNTER_FUNCTION    function counter. 
public static final  short SAC_COUNTERS_FUNCTION    function counters. 
public static final  short SAC_RGBCOLOR    RGB Colors. rgb(0, 0, 0) and #000 
public static final  short SAC_DEGREE    Angle deg. 
public static final  short SAC_GRADIAN    Angle grad. 
public static final  short SAC_RADIAN    Angle rad. 
public static final  short SAC_MILLISECOND    Time ms. 
public static final  short SAC_SECOND    Time s. 
public static final  short SAC_HERTZ    Frequency Hz. 
public static final  short SAC_KILOHERTZ    Frequency kHz. 
public static final  short SAC_IDENT    any identifier except inherit. 
public static final  short SAC_STRING_VALUE    A string. 
public static final  short SAC_ATTR    Attribute: attr(...). 
public static final  short SAC_RECT_FUNCTION    function rect. 
public static final  short SAC_UNICODERANGE    A unicode range. @@TO BE DEFINED 
public static final  short SAC_SUB_EXPRESSION    sub expressions (a) (a + b) (normal/none) 
public static final  short SAC_FUNCTION    unknown function. 
public static final  short SAC_DIMENSION    unknown dimension. 
Method from org.w3c.css.sac.LexicalUnit Summary:
getDimensionUnitText,   getFloatValue,   getFunctionName,   getIntegerValue,   getLexicalUnitType,   getNextLexicalUnit,   getParameters,   getPreviousLexicalUnit,   getStringValue,   getSubValues
Method from org.w3c.css.sac.LexicalUnit Detail:
 public String getDimensionUnitText()
    Returns the string representation of the unit.

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

 public 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.

 public String getFunctionName()
    Returns the name of the function.
 public int getIntegerValue()
    Returns the integer value.
 public short getLexicalUnitType()
    An integer indicating the type of LexicalUnit.
 public LexicalUnit getNextLexicalUnit()
    Returns the next value or null if any.
 public LexicalUnit getParameters()
    The function parameters including operators (like the comma). #000 is converted to rgb(0, 0, 0) can return null if SAC_FUNCTION.
 public LexicalUnit getPreviousLexicalUnit()
    Returns the previous value or null if any.
 public 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(....).

 public LexicalUnit getSubValues()
    Returns a list of values inside the sub expression.