org.apache.fop.fo.properties

Class FixedLength

Implemented Interfaces:
Length, Numeric

public class FixedLength
extends LengthProperty

An absolute length quantity in XSL

Nested Class Summary

Nested classes/interfaces 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(int baseUnits)

Method Summary

protected void
convert(double dvalue, String unit)
Convert the given length to a dimensionless integer representing a whole number of base units (milli-points).
boolean
equals(Object obj)
static FixedLength
getInstance(double numUnits, String units)
Return the canonical FixedLength instance corresponding to the computed value
double
getNumericValue()
double
getNumericValue(PercentBaseContext context)
int
getValue()
int
getValue(PercentBaseContext context)
int
hashCode()
boolean
isAbsolute()
Return true since FixedLength are always absolute.
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, getLength, getLengthPair, getLengthRange, getList, getNCname, getNumber, getNumeric, getObject, getSpace, getSpecifiedValue, getString, isAuto, setSpecifiedValue, toString

Constructor Details

FixedLength

public FixedLength(int baseUnits)
Parameters:
baseUnits - the length as a number of base units (millipoints)

Method Details

convert

protected void convert(double dvalue,
                       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.)

equals

public boolean equals(Object obj)
See Also:
java.lang.Object.equals(Object)

getInstance

public static FixedLength getInstance(double numUnits,
                                      String units)
Return the canonical FixedLength instance corresponding to the computed value
Parameters:
numUnits - input units
units - unit specifier
Returns:

getNumericValue

public double getNumericValue()
Specified by:
getNumericValue in interface Numeric

getNumericValue

public double getNumericValue(PercentBaseContext context)
Specified by:
getNumericValue in interface Numeric

getValue

public int getValue()
Specified by:
getValue in interface Length
getValue in interface Numeric

getValue

public int getValue(PercentBaseContext context)
Specified by:
getValue in interface Length
getValue in interface Numeric

hashCode

public int hashCode()
See Also:
java.lang.Object.hashCode()

isAbsolute

public boolean isAbsolute()
Return true since FixedLength are always absolute.
Specified by:
isAbsolute in interface Numeric

toString

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

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