org.apache.fop.fo.properties
Class NumberProperty
- Numeric
public class NumberProperty
Class for handling numeric properties
getCharacter , getColor , getCondLength , getEnum , getKeep , getLength , getLengthPair , getLengthRange , getList , getNCname , getNumber , getNumeric , getObject , getSpace , getSpecifiedValue , getString , isAuto , setSpecifiedValue , toString |
NumberProperty
protected NumberProperty(Number num)
Constructor for Number input
num
- Number object value for property
NumberProperty
protected NumberProperty(double num)
Constructor for double input
num
- double numeric value for property
NumberProperty
protected NumberProperty(int num)
Constructor for integer input
num
- integer numeric value for property
equals
public boolean equals(Object o)
getColor
public Color getColor(FOUserAgent foUserAgent)
Convert NumberProperty to a Color. Not sure why this is needed.
- getColor in interface Property
foUserAgent
- FOUserAgent
- Color that corresponds to black
getDimension
public int getDimension()
Plain number always has a dimension of 0.
- getDimension in interface Numeric
getInstance
public static NumberProperty getInstance(Number num)
Returns the canonical NumberProperty instance
corresponding to the given Number
- the canonical NumberProperty
getInstance
public static NumberProperty getInstance(double num)
Returns the canonical NumberProperty instance
corresponding to the given double
num
- the base double value
- the canonical NumberProperty
getInstance
public static NumberProperty getInstance(int num)
Returns the canonical NumberProperty instance
corresponding to the given int
- the canonical NumberProperty
getNumber
public Number getNumber()
- getNumber in interface Property
- this.number cast as a Number
getNumeric
public Numeric getNumeric()
Convert NumberProperty to Numeric object
- getNumeric in interface Property
- Numeric object corresponding to this
getNumericValue
public double getNumericValue()
Return the value of this Numeric.
- getNumericValue in interface Numeric
getObject
public Object getObject()
- getObject in interface Property
- this.number cast as an Object
hashCode
public int hashCode()
isAbsolute
public boolean isAbsolute()
Return true because all numbers are absolute.
- isAbsolute in interface Numeric
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.