## org.apache.fop.datatypes
Class Length

    java.lang.Object
      |
      +--org.apache.fop.datatypes.Length

Direct Known Subclasses:
  MixedLength, PercentLength

public class Length
extends java.lang.Object

a length quantity in XSL

Field Summary
`static Length` `AUTO`
`protected boolean` `bIsComputed`
`protected int` `millipoints`

Constructor Summary
`Length(double numRelUnits, int iCurFontSize)` Set the length given a number of relative units and the current font size in base units.
`Length(double numUnits, java.lang.String units)` Set the length given a number of units and a unit name.
`Length(int baseUnits)` set the length as a number of base units

Method Summary
`protected int` `computeValue()`
`protected void` `convert(double dvalue, java.lang.String unit)` Convert the given length to a dimensionless integer representing a whole number of base units (milli-points).
`double` `getTableUnits()` Return the number of table units which are included in this length specification.
`boolean` `isAuto()`
`int` `mvalue()` return the length in 1/1000ths of a point
`protected void` `setIsComputed(boolean bIsComputed)`
`protected void` `setValue(int millipoints)`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### AUTO

    public static final Length AUTO

### millipoints

    protected int millipoints

### bIsComputed

    protected boolean bIsComputed

Constructor Detail

### Length

    public Length(double numRelUnits,
                  int iCurFontSize)

  Set the length given a number of relative units and the current font size in base units.

### Length

    public Length(double numUnits,
                  java.lang.String units)

  Set the length given a number of units and a unit name.

### Length

    public Length(int baseUnits)

  set the length as a number of base units

Method Detail

### convert

    protected void convert(double dvalue,
                           java.lang.String unit)

  Convert the given length to a dimensionless integer representing a whole number of base units (milli-points).

### setIsComputed

    protected void setIsComputed(boolean bIsComputed)

### mvalue

    public int mvalue()

  return the length in 1/1000ths of a point

### computeValue

    protected int computeValue()

### setValue

    protected void setValue(int millipoints)

### isAuto

    public boolean isAuto()

### getTableUnits

    public double getTableUnits()

  Return the number of table units which are included in this length specification. This will always be 0 unless the property specification used the proportional-column-width() function (only only table column FOs).

  If this value is not 0, the actual value of the Length cannot be known without looking at all of the columns in the table to determine the value of a "table-unit".

  Returns:
    The number of table units which are included in this length specification.

### toString

    public java.lang.String toString()

  Overrides:
    toString in class java.lang.Object

Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.