org.apache.fop.fo.properties

Class TableColLength

Implemented Interfaces:
Length, Numeric

public class TableColLength
extends LengthProperty

A table-column width specification, possibly including some number of proportional "column-units". The absolute size of a column-unit depends on the fixed and proportional sizes of all columns in the table, and on the overall size of the table. It can't be calculated until all columns have been specified and until the actual width of the table is known. Since this can be specified as a percent of its parent containing width, the calculation is done during layout. NOTE: this is only supposed to be allowed if table-layout=fixed.

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

TableColLength(double tcolUnits, FObj column)
Construct an object with tcolUnits of proportional measure.

Method Summary

double
getNumericValue()
Return the value as a numeric value.
double
getNumericValue(PercentBaseContext context)
double
getTableUnits()
Override the method in Length
int
getValue()
Return the value as a length.
int
getValue(PercentBaseContext context)
boolean
isAbsolute()
Return false because table-col-units are a relative numeric.
String
toString()
Convert this to a String

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

TableColLength

public TableColLength(double tcolUnits,
                      FObj column)
Construct an object with tcolUnits of proportional measure.
Parameters:
tcolUnits - number of table-column proportional units
column - the column the column-units are defined on

Method Details

getNumericValue

public double getNumericValue()
Return the value as a numeric value.
Specified by:
getNumericValue in interface Numeric

getNumericValue

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

getTableUnits

public double getTableUnits()
Override the method in Length
Overrides:
getTableUnits in interface LengthProperty
Returns:
the number of specified proportional table-column units.

getValue

public int getValue()
Return the value as a length.
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

isAbsolute

public boolean isAbsolute()
Return false because table-col-units are a relative numeric.
Specified by:
isAbsolute in interface Numeric

toString

public String toString()
Convert this to a String
Overrides:
toString in interface Property
Returns:
the string representation of this

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