org.apache.fop.fo.expr

Class NumericProperty

Implemented Interfaces:
Length, Numeric

public class NumericProperty
extends Property
implements Numeric, Length

A numeric property which hold the final absolute result of an expression calculations.

Field Summary

Fields inherited from class org.apache.fop.fo.properties.Property

log

Constructor Summary

NumericProperty(double value, int dim)
Construct a Numeric object by specifying one or more components, including absolute length, percent length, table units.

Method Summary

Color
getColor(FOUserAgent foUserAgent)
int
getDimension()
Return the dimension.
Length
getLength()
Number
getNumber()
Numeric
getNumeric()
double
getNumericValue()
Return the value.
double
getNumericValue(PercentBaseContext context)
Object
getObject()
int
getValue()
int
getValue(PercentBaseContext context)
boolean
isAbsolute()
Return true of the numeric is absolute.
String
toString()

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

NumericProperty

protected NumericProperty(double value,
                          int dim)
Construct a Numeric object by specifying one or more components, including absolute length, percent length, table units.
Parameters:
value - The value of the numeric.
dim - The dimension of the value. 0 for a Number, 1 for a Length (any type), >1, <0 if Lengths have been multiplied or divided.

Method Details

getColor

public Color getColor(FOUserAgent foUserAgent)
Overrides:
getColor in interface Property

getDimension

public int getDimension()
Return the dimension.
Specified by:
getDimension in interface Numeric

getLength

public Length getLength()
Overrides:
getLength in interface Property

getNumber

public Number getNumber()
Overrides:
getNumber in interface Property

getNumeric

public Numeric getNumeric()
Overrides:
getNumeric in interface Property

getNumericValue

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

getNumericValue

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

getObject

public Object getObject()
Overrides:
getObject in interface Property

getValue

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

getValue

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

isAbsolute

public boolean isAbsolute()
Return true of the numeric is absolute.
Specified by:
isAbsolute in interface Numeric

toString

public String toString()
Overrides:
toString in interface Property

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