FileDocCategorySizeDatePackage
Length.javaAPI DocphoneME MR2 API (J2ME)2781Wed May 02 18:00:36 BST 2007com.sun.perseus.parser

Length

public class Length extends Object
The LengthParser returns Length objects from its parserLength method.
The Length class captures the value of the length valut along with its unit. The resolution into a user space value depends on the context (e.g., in Perseus, the {@link com.sun.perseus.builder.BuildContext} class holds the context) defining things like the size of a pixel.
see
LengthParser
see
com.sun.perseus.builder.BuilderUtil
version
$Id: Length.java,v 1.2 2006/04/21 06:40:28 st125089 Exp $

Fields Summary
public static final int
SVG_LENGTHTYPE_NUMBER
Plain length, no unit
public static final int
SVG_LENGTHTYPE_PERCENTAGE
Percentage unit, usually used for percentage of viewport width or height.
public static final int
SVG_LENGTHTYPE_CM
Centimeter unit
public static final int
SVG_LENGTHTYPE_MM
Millimeter unit.
public static final int
SVG_LENGTHTYPE_IN
Inch unit (2.54cm)
public static final int
SVG_LENGTHTYPE_PT
Point unit. A point is 1/72th of an inch as defined in the CSS 2 specification.
public static final int
SVG_LENGTHTYPE_PC
Pica unit. A pica is 12 points as defined in the CSS 2 specification.
public int
unit
The unit value. One of the SVG_LENGTHTYPE_XXX values.
public float
value
The actual length value, prior to unit convertion
Constructors Summary
Methods Summary