org.apache.batik.css.parser
Class CSSLexicalUnit

java.lang.Object
  |
  +--org.apache.batik.css.parser.CSSLexicalUnit
All Implemented Interfaces:
LexicalUnit
Direct Known Subclasses:
CSSLexicalUnit.DimensionLexicalUnit, CSSLexicalUnit.FloatLexicalUnit, CSSLexicalUnit.FunctionLexicalUnit, CSSLexicalUnit.IntegerLexicalUnit, CSSLexicalUnit.PredefinedFunctionLexicalUnit, CSSLexicalUnit.SimpleLexicalUnit, CSSLexicalUnit.StringLexicalUnit

public abstract class CSSLexicalUnit
extends java.lang.Object
implements LexicalUnit

This class implements the CSSLexicalUnit.SimpleLexicalUnit interface.


Inner 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  LexicalUnit nextLexicalUnit
          The next lexical unit.
protected  LexicalUnit previousLexicalUnit
          The previous lexical unit.
 
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, LexicalUnit prev)
          Creates a new LexicalUnit.
 
Method Summary
static CSSLexicalUnit createDimension(float val, java.lang.String dim, LexicalUnit prev)
          Creates a new float lexical unit.
static CSSLexicalUnit createFloat(short t, float val, LexicalUnit prev)
          Creates a new float lexical unit.
static CSSLexicalUnit createFunction(java.lang.String f, LexicalUnit params, LexicalUnit prev)
          Creates a new function lexical unit.
static CSSLexicalUnit createInteger(int val, LexicalUnit prev)
          Creates a new integer lexical unit.
static CSSLexicalUnit createPredefinedFunction(short t, LexicalUnit params, LexicalUnit prev)
          Creates a new function lexical unit.
static CSSLexicalUnit createSimple(short t, LexicalUnit prev)
          Creates a new integer lexical unit.
static CSSLexicalUnit createString(short t, java.lang.String val, LexicalUnit prev)
          Creates a new string lexical unit.
 java.lang.String getDimensionUnitText()
          SAC: Implements getDimensionUnitText().
 float getFloatValue()
          SAC: Implements getFloatValue().
 java.lang.String getFunctionName()
          SAC: Implements getFunctionName().
 int getIntegerValue()
          SAC: Implements getIntegerValue().
 short getLexicalUnitType()
          SAC: Implements getLexicalUnitType().
 LexicalUnit getNextLexicalUnit()
          SAC: Implements getNextLexicalUnit().
 LexicalUnit getParameters()
          SAC: Implements getParameters().
 LexicalUnit getPreviousLexicalUnit()
          SAC: Implements getPreviousLexicalUnit().
 java.lang.String getStringValue()
          SAC: Implements getStringValue().
 LexicalUnit getSubValues()
          SAC: Implements getSubValues().
 void setNextLexicalUnit(LexicalUnit lu)
          Sets the next lexical unit.
 void setPreviousLexicalUnit(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

lexicalUnitType

protected short lexicalUnitType
The lexical unit type.

nextLexicalUnit

protected LexicalUnit nextLexicalUnit
The next lexical unit.

previousLexicalUnit

protected LexicalUnit previousLexicalUnit
The previous lexical unit.
Constructor Detail

CSSLexicalUnit

protected CSSLexicalUnit(short t,
                         LexicalUnit prev)
Creates a new LexicalUnit.
Method Detail

getLexicalUnitType

public short getLexicalUnitType()
SAC: Implements getLexicalUnitType().
Specified by:
getLexicalUnitType in interface LexicalUnit

getNextLexicalUnit

public LexicalUnit getNextLexicalUnit()
SAC: Implements getNextLexicalUnit().
Specified by:
getNextLexicalUnit in interface LexicalUnit

setNextLexicalUnit

public void setNextLexicalUnit(LexicalUnit lu)
Sets the next lexical unit.

getPreviousLexicalUnit

public LexicalUnit getPreviousLexicalUnit()
SAC: Implements getPreviousLexicalUnit().
Specified by:
getPreviousLexicalUnit in interface LexicalUnit

setPreviousLexicalUnit

public void setPreviousLexicalUnit(LexicalUnit lu)
Sets the previous lexical unit.

getIntegerValue

public int getIntegerValue()
SAC: Implements getIntegerValue().
Specified by:
getIntegerValue in interface LexicalUnit
Following copied from interface: org.w3c.css.sac.LexicalUnit
See Also:
LexicalUnit.SAC_INTEGER

getFloatValue

public float getFloatValue()
SAC: Implements getFloatValue().
Specified by:
getFloatValue in interface LexicalUnit
Following copied from interface: org.w3c.css.sac.LexicalUnit
See Also:
LexicalUnit.SAC_REAL, LexicalUnit.SAC_DIMENSION, LexicalUnit.SAC_EM, LexicalUnit.SAC_EX, LexicalUnit.SAC_PIXEL, LexicalUnit.SAC_INCH, LexicalUnit.SAC_CENTIMETER, LexicalUnit.SAC_MILLIMETER, LexicalUnit.SAC_POINT, LexicalUnit.SAC_PICA, LexicalUnit.SAC_PERCENTAGE, LexicalUnit.SAC_DEGREE, LexicalUnit.SAC_GRADIAN, LexicalUnit.SAC_RADIAN, LexicalUnit.SAC_MILLISECOND, LexicalUnit.SAC_SECOND, LexicalUnit.SAC_HERTZ, LexicalUnit.SAC_KILOHERTZ

getDimensionUnitText

public java.lang.String getDimensionUnitText()
SAC: Implements getDimensionUnitText().
Specified by:
getDimensionUnitText in interface LexicalUnit
Following copied from interface: org.w3c.css.sac.LexicalUnit
See Also:
LexicalUnit.SAC_REAL, LexicalUnit.SAC_DIMENSION, LexicalUnit.SAC_EM, LexicalUnit.SAC_EX, LexicalUnit.SAC_PIXEL, LexicalUnit.SAC_INCH, LexicalUnit.SAC_CENTIMETER, LexicalUnit.SAC_MILLIMETER, LexicalUnit.SAC_POINT, LexicalUnit.SAC_PICA, LexicalUnit.SAC_PERCENTAGE, LexicalUnit.SAC_DEGREE, LexicalUnit.SAC_GRADIAN, LexicalUnit.SAC_RADIAN, LexicalUnit.SAC_MILLISECOND, LexicalUnit.SAC_SECOND, LexicalUnit.SAC_HERTZ, LexicalUnit.SAC_KILOHERTZ

getFunctionName

public java.lang.String getFunctionName()
SAC: Implements getFunctionName().
Specified by:
getFunctionName in interface LexicalUnit
Following copied from interface: org.w3c.css.sac.LexicalUnit
See Also:
LexicalUnit.SAC_COUNTER_FUNCTION, LexicalUnit.SAC_COUNTERS_FUNCTION, LexicalUnit.SAC_RECT_FUNCTION, LexicalUnit.SAC_FUNCTION, LexicalUnit.SAC_RGBCOLOR

getParameters

public LexicalUnit getParameters()
SAC: Implements getParameters().
Specified by:
getParameters in interface LexicalUnit
Following copied from interface: org.w3c.css.sac.LexicalUnit
See Also:
LexicalUnit.SAC_COUNTER_FUNCTION, LexicalUnit.SAC_COUNTERS_FUNCTION, LexicalUnit.SAC_RECT_FUNCTION, LexicalUnit.SAC_FUNCTION, LexicalUnit.SAC_RGBCOLOR

getStringValue

public java.lang.String getStringValue()
SAC: Implements getStringValue().
Specified by:
getStringValue in interface LexicalUnit
Following copied from interface: org.w3c.css.sac.LexicalUnit
See Also:
LexicalUnit.SAC_URI, LexicalUnit.SAC_ATTR, LexicalUnit.SAC_IDENT, LexicalUnit.SAC_STRING_VALUE, @@TO BE DEFINED

getSubValues

public LexicalUnit getSubValues()
SAC: Implements getSubValues().
Specified by:
getSubValues in interface LexicalUnit
Following copied from interface: org.w3c.css.sac.LexicalUnit
See Also:
LexicalUnit.SAC_SUB_EXPRESSION

createSimple

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

createInteger

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

createFloat

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

createDimension

public static CSSLexicalUnit createDimension(float val,
                                             java.lang.String dim,
                                             LexicalUnit prev)
Creates a new float lexical unit.

createFunction

public static CSSLexicalUnit createFunction(java.lang.String f,
                                            LexicalUnit params,
                                            LexicalUnit prev)
Creates a new function lexical unit.

createPredefinedFunction

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

createString

public static CSSLexicalUnit createString(short t,
                                          java.lang.String val,
                                          LexicalUnit prev)
Creates a new string lexical unit.


Copyright © 2002 Apache Software Foundation. All Rights Reserved.