|
fop 0.94 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fop.fo.properties.Property
org.apache.fop.fo.properties.NumberProperty
public class NumberProperty
Class for handling numeric properties
| Nested Class Summary | |
|---|---|
static class |
NumberProperty.Maker
Inner class for making NumberProperty objects |
| Field Summary |
|---|
| Fields inherited from class org.apache.fop.fo.properties.Property |
|---|
log |
| Constructor Summary | |
|---|---|
protected |
NumberProperty(double num)
Constructor for double input |
protected |
NumberProperty(int num)
Constructor for integer input |
protected |
NumberProperty(java.lang.Number num)
Constructor for Number input |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
java.awt.Color |
getColor(FOUserAgent foUserAgent)
Convert NumberProperty to a Color. |
int |
getDimension()
Plain number always has a dimension of 0. |
static NumberProperty |
getInstance(double num)
Returns the canonical NumberProperty instance corresponding to the given double |
static NumberProperty |
getInstance(int num)
Returns the canonical NumberProperty instance corresponding to the given int |
static NumberProperty |
getInstance(java.lang.Number num)
Returns the canonical NumberProperty instance corresponding to the given Number |
Length |
getLength()
This method expects to be overridden by subclasses |
java.lang.Number |
getNumber()
This method expects to be overridden by subclasses |
Numeric |
getNumeric()
Convert NumberProperty to Numeric object |
double |
getNumericValue()
Return the value of this Numeric. |
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)
Return the value |
int |
hashCode()
|
boolean |
isAbsolute()
Return true because all numbers are absolute. |
| Methods inherited from class org.apache.fop.fo.properties.Property |
|---|
getCharacter, getCondLength, getEnum, getKeep, getLengthPair, getLengthRange, getList, getNCname, getSpace, getSpecifiedValue, getString, isAuto, setSpecifiedValue, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.fop.datatypes.Numeric |
|---|
getEnum |
| Constructor Detail |
|---|
protected NumberProperty(java.lang.Number num)
num - Number object value for propertyprotected NumberProperty(double num)
num - double numeric value for propertyprotected NumberProperty(int num)
num - integer numeric value for property| Method Detail |
|---|
public static NumberProperty getInstance(java.lang.Number num)
num - the base Number
public static NumberProperty getInstance(double num)
num - the base double value
public static NumberProperty getInstance(int num)
num - the base int value
public int getDimension()
getDimension in interface NumericNumeric.getDimension()public double getNumericValue()
getNumericValue in interface NumericNumeric.getNumericValue()public double getNumericValue(PercentBaseContext context)
getNumericValue in interface Numericcontext - Evaluation context
Numeric.getNumericValue(PercentBaseContext)public int getValue()
Numeric
getValue in interface NumericNumeric.getValue()public int getValue(PercentBaseContext context)
getValue in interface Numericcontext - Evaluation context
Numeric.getValue(PercentBaseContext)public boolean isAbsolute()
isAbsolute in interface NumericNumeric.isAbsolute()public java.lang.Number getNumber()
Property
getNumber in class Propertypublic java.lang.Object getObject()
Property
getObject in class Propertypublic Numeric getNumeric()
getNumeric in class Propertypublic Length getLength()
Property
getLength in class PropertyProperty.getLength()public java.awt.Color getColor(FOUserAgent foUserAgent)
getColor in class PropertyfoUserAgent - FOUserAgent
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
fop 0.94 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||