|
fop 2.0 | |||||||||
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 final class NumberProperty
Class for handling numeric properties
Nested Class Summary | |
---|---|
static class |
NumberProperty.Maker
Inner class for making NumberProperty objects |
static class |
NumberProperty.PositiveIntegerMaker
A positive integer property maker. |
Field Summary |
---|
Fields inherited from class org.apache.fop.fo.properties.Property |
---|
log |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
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(java.lang.Double num)
Returns the canonical NumberProperty instance corresponding to the given Number |
static NumberProperty |
getInstance(int num)
Returns the canonical NumberProperty instance corresponding to the given int |
static NumberProperty |
getInstance(java.lang.Integer num)
Returns the canonical NumberProperty instance corresponding to the given Integer |
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 |
Method Detail |
---|
public static NumberProperty getInstance(java.lang.Double num)
num
- the base Double
public static NumberProperty getInstance(java.lang.Integer num)
num
- the base Integer
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 Numeric
public double getNumericValue()
getNumericValue
in interface Numeric
public double getNumericValue(PercentBaseContext context)
getNumericValue
in interface Numeric
context
- Evaluation context
public int getValue()
getValue
in interface Numeric
public int getValue(PercentBaseContext context)
getValue
in interface Numeric
context
- Evaluation context
public boolean isAbsolute()
isAbsolute
in interface Numeric
public java.lang.Number getNumber()
Property
getNumber
in class Property
public java.lang.Object getObject()
Property
getObject
in class Property
public Numeric getNumeric()
getNumeric
in class Property
public Length getLength()
getLength
in class Property
public java.awt.Color getColor(FOUserAgent foUserAgent)
getColor
in class Property
foUserAgent
- FOUserAgent
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
fop 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |