fop 0.93

org.apache.fop.fo.expr
Class NumericProperty

java.lang.Object
  |
  +--org.apache.fop.fo.properties.Property
        |
        +--org.apache.fop.fo.expr.NumericProperty
All 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.


Fields inherited from class org.apache.fop.fo.properties.Property
log
 
Constructor Summary
protected NumericProperty(double value, int dim)
          Construct a Numeric object by specifying one or more components, including absolute length, percent length, table units.
 
Method Summary
 java.awt.Color getColor(FOUserAgent foUserAgent)
          This method expects to be overridden by subclasses
 int getDimension()
          Return the dimension.
 Length getLength()
          This method expects to be overridden by subclasses
 java.lang.Number getNumber()
          This method expects to be overridden by subclasses
 Numeric getNumeric()
          This method expects to be overridden by subclasses
 double getNumericValue()
          Return the value.
 double getNumericValue(PercentBaseContext context)
          Return the value of this Numeric
 java.lang.Object getObject()
          This method expects to be overridden by subclasses
 int getValue()
          Returns the value of this numeric as an int.
 int getValue(PercentBaseContext context)
          Returns the value of this numeric as an int.
 boolean isAbsolute()
          Return true of the numeric is absolute.
 java.lang.String toString()
           
 
Methods inherited from class org.apache.fop.fo.properties.Property
getCharacter, getCondLength, getEnum, getKeep, getLengthPair, getLengthRange, getList, getNCname, 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

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 Detail

getDimension

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

getNumericValue

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

getNumericValue

public double getNumericValue(PercentBaseContext context)
Description copied from interface: Numeric
Return the value of this Numeric
Specified by:
getNumericValue in interface Numeric
See Also:
Numeric.getNumericValue(PercentBaseContext)

isAbsolute

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

getNumeric

public Numeric getNumeric()
Description copied from class: Property
This method expects to be overridden by subclasses
Overrides:
getNumeric in class Property
See Also:
Property.getNumeric()

getNumber

public java.lang.Number getNumber()
Description copied from class: Property
This method expects to be overridden by subclasses
Overrides:
getNumber in class Property
See Also:
Property.getNumber()

getValue

public int getValue()
Description copied from interface: Numeric
Returns the value of this numeric as an int.
Specified by:
getValue in interface Numeric
See Also:
Numeric.getValue()

getValue

public int getValue(PercentBaseContext context)
Description copied from interface: Numeric
Returns the value of this numeric as an int.
Specified by:
getValue in interface Numeric
See Also:
Numeric.getValue(PercentBaseContext)

getLength

public Length getLength()
Description copied from class: Property
This method expects to be overridden by subclasses
Overrides:
getLength in class Property
See Also:
Property.getLength()

getColor

public java.awt.Color getColor(FOUserAgent foUserAgent)
Description copied from class: Property
This method expects to be overridden by subclasses
Overrides:
getColor in class Property
See Also:
Property.getColor(FOUserAgent)

getObject

public java.lang.Object getObject()
Description copied from class: Property
This method expects to be overridden by subclasses
Overrides:
getObject in class Property
See Also:
Property.getObject()

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.