fop 0.93

org.apache.fop.fo.properties
Class FixedLength

java.lang.Object
  extended byorg.apache.fop.fo.properties.Property
      extended byorg.apache.fop.fo.properties.LengthProperty
          extended byorg.apache.fop.fo.properties.FixedLength
All Implemented Interfaces:
Length, Numeric

public class FixedLength
extends LengthProperty

An absolute length quantity in XSL


Nested Class Summary
 
Nested classes inherited from class org.apache.fop.fo.properties.LengthProperty
LengthProperty.Maker
 
Field Summary
 
Fields inherited from class org.apache.fop.fo.properties.Property
log
 
Constructor Summary
FixedLength(double numRelUnits, int iCurFontSize)
          Set the length given
FixedLength(double numUnits, java.lang.String units)
          Set the length given a number of units and a unit name.
FixedLength(int baseUnits)
           
 
Method Summary
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 getNumericValue()
          Return the value of this Numeric
 double getNumericValue(PercentBaseContext context)
          Return the value of this Numeric
 int getValue()
          Returns the length in 1/1000ths of a point (millipoints)
 int getValue(PercentBaseContext context)
          Returns the length in 1/1000ths of a point (millipoints)
 boolean isAbsolute()
          Return true since FixedLength are always absolute.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.fop.fo.properties.LengthProperty
getDimension, getLength, getNumeric, getObject, getTableUnits
 
Methods inherited from class org.apache.fop.fo.properties.Property
getCharacter, getColor, getCondLength, getEnum, getKeep, getLengthPair, getLengthRange, getList, getNCname, getNumber, getSpace, getSpecifiedValue, getString, isAuto, setSpecifiedValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.fop.datatypes.Numeric
getEnum
 

Constructor Detail

FixedLength

public FixedLength(double numRelUnits,
                   int iCurFontSize)
Set the length given

Parameters:
numRelUnits - the number of relative units
iCurFontSize - the current font size in base units.

FixedLength

public FixedLength(double numUnits,
                   java.lang.String units)
Set the length given a number of units and a unit name.

Parameters:
numUnits - quantity of input units
units - input unit specifier (in, cm, etc.)

FixedLength

public FixedLength(int baseUnits)
Parameters:
baseUnits - the length as a number of base units (millipoints)
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).

Parameters:
dvalue - quantity of input units
unit - input unit specifier (in, cm, etc.)

getValue

public int getValue()
Description copied from interface: Length
Returns the length in 1/1000ths of a point (millipoints)

Returns:
the length in millipoints
See Also:
Numeric.getValue()

getValue

public int getValue(PercentBaseContext context)
Description copied from interface: Length
Returns the length in 1/1000ths of a point (millipoints)

Parameters:
context - The context for the length calculation (for percentage based lengths)
Returns:
the length in millipoints
See Also:
Numeric.getValue(PercentBaseContext)

getNumericValue

public double getNumericValue()
Description copied from interface: Numeric
Return the value of this Numeric

Returns:
the computed value.
See Also:
Numeric.getNumericValue()

getNumericValue

public double getNumericValue(PercentBaseContext context)
Description copied from interface: Numeric
Return the value of this Numeric

Parameters:
context - The context for the length calculation (for percentage based lengths)
Returns:
the computed value.
See Also:
Numeric.getNumericValue(PercentBaseContext)

isAbsolute

public boolean isAbsolute()
Return true since FixedLength are always absolute.

Returns:
true when the numeric is absolute.
See Also:
Numeric.isAbsolute()

toString

public java.lang.String toString()
Overrides:
toString in class Property
See Also:
Object.toString()

fop 0.93

Copyright 1999-2006 The Apache Software Foundation. All Rights Reserved.