org.apache.batik.css.parser
Class CSSLexicalUnit

java.lang.Object
  extended by org.apache.batik.css.parser.CSSLexicalUnit
All Implemented Interfaces:
org.w3c.css.sac.LexicalUnit
Direct Known Subclasses:
CSSLexicalUnit.DimensionLexicalUnit, CSSLexicalUnit.FloatLexicalUnit, CSSLexicalUnit.FunctionLexicalUnit, CSSLexicalUnit.IntegerLexicalUnit, CSSLexicalUnit.PredefinedFunctionLexicalUnit, CSSLexicalUnit.SimpleLexicalUnit, CSSLexicalUnit.StringLexicalUnit

public abstract class CSSLexicalUnit
extends Object
implements org.w3c.css.sac.LexicalUnit

This class implements the CSSLexicalUnit.SimpleLexicalUnit interface.


Nested Class Summary
protected static class CSSLexicalUnit.DimensionLexicalUnit
          This class represents a dimension unit.
protected static class CSSLexicalUnit.FloatLexicalUnit
          This class represents a float unit.
protected static class CSSLexicalUnit.FunctionLexicalUnit
          This class represents a function unit.
protected static class CSSLexicalUnit.IntegerLexicalUnit
          This class represents an integer unit.
protected static class CSSLexicalUnit.PredefinedFunctionLexicalUnit
          This class represents a function unit.
protected static class CSSLexicalUnit.SimpleLexicalUnit
          This class represents a simple unit.
protected static class CSSLexicalUnit.StringLexicalUnit
          This class represents a string unit.
 
Field Summary
protected  short lexicalUnitType
          The lexical unit type.
protected  org.w3c.css.sac.LexicalUnit nextLexicalUnit
          The next lexical unit.
protected  org.w3c.css.sac.LexicalUnit previousLexicalUnit
          The previous lexical unit.
static String TEXT_COUNTER_FUNCTION
           
static String TEXT_COUNTERS_FUNCTION
           
static String TEXT_RECT_FUNCTION
           
static String TEXT_RGBCOLOR
           
static String UNIT_TEXT_CENTIMETER
           
static String UNIT_TEXT_DEGREE
           
static String UNIT_TEXT_EM
           
static String UNIT_TEXT_EX
           
static String UNIT_TEXT_GRADIAN
           
static String UNIT_TEXT_HERTZ
           
static String UNIT_TEXT_INCH
           
static String UNIT_TEXT_KILOHERTZ
           
static String UNIT_TEXT_MILLIMETER
           
static String UNIT_TEXT_MILLISECOND
           
static String UNIT_TEXT_PERCENTAGE
           
static String UNIT_TEXT_PICA
           
static String UNIT_TEXT_PIXEL
           
static String UNIT_TEXT_POINT
           
static String UNIT_TEXT_RADIAN
           
static String UNIT_TEXT_REAL
           
static String UNIT_TEXT_SECOND
           
 
Fields inherited from interface org.w3c.css.sac.LexicalUnit
SAC_ATTR, SAC_CENTIMETER, SAC_COUNTER_FUNCTION, SAC_COUNTERS_FUNCTION, SAC_DEGREE, SAC_DIMENSION, SAC_EM, SAC_EX, SAC_FUNCTION, SAC_GRADIAN, SAC_HERTZ, SAC_IDENT, SAC_INCH, SAC_INHERIT, SAC_INTEGER, SAC_KILOHERTZ, SAC_MILLIMETER, SAC_MILLISECOND, SAC_OPERATOR_COMMA, SAC_OPERATOR_EXP, SAC_OPERATOR_GE, SAC_OPERATOR_GT, SAC_OPERATOR_LE, SAC_OPERATOR_LT, SAC_OPERATOR_MINUS, SAC_OPERATOR_MOD, SAC_OPERATOR_MULTIPLY, SAC_OPERATOR_PLUS, SAC_OPERATOR_SLASH, SAC_OPERATOR_TILDE, SAC_PERCENTAGE, SAC_PICA, SAC_PIXEL, SAC_POINT, SAC_RADIAN, SAC_REAL, SAC_RECT_FUNCTION, SAC_RGBCOLOR, SAC_SECOND, SAC_STRING_VALUE, SAC_SUB_EXPRESSION, SAC_UNICODERANGE, SAC_URI
 
Constructor Summary
protected CSSLexicalUnit(short t, org.w3c.css.sac.LexicalUnit prev)
          Creates a new LexicalUnit.
 
Method Summary
static CSSLexicalUnit createDimension(float val, String dim, org.w3c.css.sac.LexicalUnit prev)
          Creates a new float lexical unit.
static CSSLexicalUnit createFloat(short t, float val, org.w3c.css.sac.LexicalUnit prev)
          Creates a new float lexical unit.
static CSSLexicalUnit createFunction(String f, org.w3c.css.sac.LexicalUnit params, org.w3c.css.sac.LexicalUnit prev)
          Creates a new function lexical unit.
static CSSLexicalUnit createInteger(int val, org.w3c.css.sac.LexicalUnit prev)
          Creates a new integer lexical unit.
static CSSLexicalUnit createPredefinedFunction(short t, org.w3c.css.sac.LexicalUnit params, org.w3c.css.sac.LexicalUnit prev)
          Creates a new function lexical unit.
static CSSLexicalUnit createSimple(short t, org.w3c.css.sac.LexicalUnit prev)
          Creates a new integer lexical unit.
static CSSLexicalUnit createString(short t, String val, org.w3c.css.sac.LexicalUnit prev)
          Creates a new string lexical unit.
 String getDimensionUnitText()
          SAC: Implements getDimensionUnitText().
 float getFloatValue()
          SAC: Implements getFloatValue().
 String getFunctionName()
          SAC: Implements getFunctionName().
 int getIntegerValue()
          SAC: Implements getIntegerValue().
 short getLexicalUnitType()
          SAC: Implements getLexicalUnitType().
 org.w3c.css.sac.LexicalUnit getNextLexicalUnit()
          SAC: Implements getNextLexicalUnit().
 org.w3c.css.sac.LexicalUnit getParameters()
          SAC: Implements getParameters().
 org.w3c.css.sac.LexicalUnit getPreviousLexicalUnit()
          SAC: Implements getPreviousLexicalUnit().
 String getStringValue()
          SAC: Implements getStringValue().
 org.w3c.css.sac.LexicalUnit getSubValues()
          SAC: Implements getSubValues().
 void setNextLexicalUnit(org.w3c.css.sac.LexicalUnit lu)
          Sets the next lexical unit.
 void setPreviousLexicalUnit(org.w3c.css.sac.LexicalUnit lu)
          Sets the previous lexical unit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNIT_TEXT_CENTIMETER

public static final String UNIT_TEXT_CENTIMETER
See Also:
Constant Field Values

UNIT_TEXT_DEGREE

public static final String UNIT_TEXT_DEGREE
See Also:
Constant Field Values

UNIT_TEXT_EM

public static final String UNIT_TEXT_EM
See Also:
Constant Field Values

UNIT_TEXT_EX

public static final String UNIT_TEXT_EX
See Also:
Constant Field Values

UNIT_TEXT_GRADIAN

public static final String UNIT_TEXT_GRADIAN
See Also:
Constant Field Values

UNIT_TEXT_HERTZ

public static final String UNIT_TEXT_HERTZ
See Also:
Constant Field Values

UNIT_TEXT_INCH

public static final String UNIT_TEXT_INCH
See Also:
Constant Field Values

UNIT_TEXT_KILOHERTZ

public static final String UNIT_TEXT_KILOHERTZ
See Also:
Constant Field Values

UNIT_TEXT_MILLIMETER

public static final String UNIT_TEXT_MILLIMETER
See Also:
Constant Field Values

UNIT_TEXT_MILLISECOND

public static final String UNIT_TEXT_MILLISECOND
See Also:
Constant Field Values

UNIT_TEXT_PERCENTAGE

public static final String UNIT_TEXT_PERCENTAGE
See Also:
Constant Field Values

UNIT_TEXT_PICA

public static final String UNIT_TEXT_PICA
See Also:
Constant Field Values

UNIT_TEXT_PIXEL

public static final String UNIT_TEXT_PIXEL
See Also:
Constant Field Values

UNIT_TEXT_POINT

public static final String UNIT_TEXT_POINT
See Also:
Constant Field Values

UNIT_TEXT_RADIAN

public static final String UNIT_TEXT_RADIAN
See Also:
Constant Field Values

UNIT_TEXT_REAL

public static final String UNIT_TEXT_REAL
See Also:
Constant Field Values

UNIT_TEXT_SECOND

public static final String UNIT_TEXT_SECOND
See Also:
Constant Field Values

TEXT_RGBCOLOR

public static final String TEXT_RGBCOLOR
See Also:
Constant Field Values

TEXT_RECT_FUNCTION

public static final String TEXT_RECT_FUNCTION
See Also:
Constant Field Values

TEXT_COUNTER_FUNCTION

public static final String TEXT_COUNTER_FUNCTION
See Also:
Constant Field Values

TEXT_COUNTERS_FUNCTION

public static final String TEXT_COUNTERS_FUNCTION
See Also:
Constant Field Values

lexicalUnitType

protected short lexicalUnitType
The lexical unit type.


nextLexicalUnit

protected org.w3c.css.sac.LexicalUnit nextLexicalUnit
The next lexical unit.


previousLexicalUnit

protected org.w3c.css.sac.LexicalUnit previousLexicalUnit
The previous lexical unit.

Constructor Detail

CSSLexicalUnit

protected CSSLexicalUnit(short t,
                         org.w3c.css.sac.LexicalUnit prev)
Creates a new LexicalUnit.

Method Detail

getLexicalUnitType

public short getLexicalUnitType()
SAC: Implements getLexicalUnitType().

Specified by:
getLexicalUnitType in interface org.w3c.css.sac.LexicalUnit

getNextLexicalUnit

public org.w3c.css.sac.LexicalUnit getNextLexicalUnit()
SAC: Implements getNextLexicalUnit().

Specified by:
getNextLexicalUnit in interface org.w3c.css.sac.LexicalUnit

setNextLexicalUnit

public void setNextLexicalUnit(org.w3c.css.sac.LexicalUnit lu)
Sets the next lexical unit.


getPreviousLexicalUnit

public org.w3c.css.sac.LexicalUnit getPreviousLexicalUnit()
SAC: Implements getPreviousLexicalUnit().

Specified by:
getPreviousLexicalUnit in interface org.w3c.css.sac.LexicalUnit

setPreviousLexicalUnit

public void setPreviousLexicalUnit(org.w3c.css.sac.LexicalUnit lu)
Sets the previous lexical unit.


getIntegerValue

public int getIntegerValue()
SAC: Implements getIntegerValue().

Specified by:
getIntegerValue in interface org.w3c.css.sac.LexicalUnit

getFloatValue

public float getFloatValue()
SAC: Implements getFloatValue().

Specified by:
getFloatValue in interface org.w3c.css.sac.LexicalUnit

getDimensionUnitText

public String getDimensionUnitText()
SAC: Implements getDimensionUnitText().

Specified by:
getDimensionUnitText in interface org.w3c.css.sac.LexicalUnit

getFunctionName

public String getFunctionName()
SAC: Implements getFunctionName().

Specified by:
getFunctionName in interface org.w3c.css.sac.LexicalUnit

getParameters

public org.w3c.css.sac.LexicalUnit getParameters()
SAC: Implements getParameters().

Specified by:
getParameters in interface org.w3c.css.sac.LexicalUnit

getStringValue

public String getStringValue()
SAC: Implements getStringValue().

Specified by:
getStringValue in interface org.w3c.css.sac.LexicalUnit

getSubValues

public org.w3c.css.sac.LexicalUnit getSubValues()
SAC: Implements getSubValues().

Specified by:
getSubValues in interface org.w3c.css.sac.LexicalUnit

createSimple

public static CSSLexicalUnit createSimple(short t,
                                          org.w3c.css.sac.LexicalUnit prev)
Creates a new integer lexical unit.


createInteger

public static CSSLexicalUnit createInteger(int val,
                                           org.w3c.css.sac.LexicalUnit prev)
Creates a new integer lexical unit.


createFloat

public static CSSLexicalUnit createFloat(short t,
                                         float val,
                                         org.w3c.css.sac.LexicalUnit prev)
Creates a new float lexical unit.


createDimension

public static CSSLexicalUnit createDimension(float val,
                                             String dim,
                                             org.w3c.css.sac.LexicalUnit prev)
Creates a new float lexical unit.


createFunction

public static CSSLexicalUnit createFunction(String f,
                                            org.w3c.css.sac.LexicalUnit params,
                                            org.w3c.css.sac.LexicalUnit prev)
Creates a new function lexical unit.


createPredefinedFunction

public static CSSLexicalUnit createPredefinedFunction(short t,
                                                      org.w3c.css.sac.LexicalUnit params,
                                                      org.w3c.css.sac.LexicalUnit prev)
Creates a new function lexical unit.


createString

public static CSSLexicalUnit createString(short t,
                                          String val,
                                          org.w3c.css.sac.LexicalUnit prev)
Creates a new string lexical unit.



Copyright © 2008 Apache Software Foundation. All Rights Reserved.