|
fop 0.93 | ||||||||||
| 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.expr.RelativeNumericProperty
This class represent a node in a property expression tree. It is created when an operation involve relative expression and is used to delay evaluation of the operation until the time where getNumericValue() or getValue() is called.
| Field Summary | |
static int |
ABS
|
static int |
ADDITION
|
static int |
DIVIDE
|
static int |
MAX
|
static int |
MIN
|
static int |
MODULO
|
static int |
MULTIPLY
|
static int |
NEGATE
|
static int |
SUBTRACTION
|
| Fields inherited from class org.apache.fop.fo.properties.Property |
log |
| Constructor Summary | |
RelativeNumericProperty(int operation,
Numeric op)
Constructor for a one argument operation. |
|
RelativeNumericProperty(int operation,
Numeric op1,
Numeric op2)
Constructor for a two argument operation. |
|
| Method Summary | |
int |
getDimension()
Return the dimension of the expression |
Length |
getLength()
Cast this numeric as a Length. |
Numeric |
getNumeric()
This method expects to be overridden by subclasses |
double |
getNumericValue()
Return the resolved (calculated) value of the expression. |
double |
getNumericValue(PercentBaseContext context)
Return the value of this Numeric |
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 false since an expression is only created when there is relative numerics involved. |
java.lang.String |
toString()
Return a string represention of the expression. |
| Methods inherited from class org.apache.fop.fo.properties.Property |
getCharacter, getColor, getCondLength, getEnum, getKeep, getLengthPair, getLengthRange, getList, getNCname, getNumber, getObject, 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 |
| Field Detail |
public static final int ADDITION
public static final int SUBTRACTION
public static final int MULTIPLY
public static final int DIVIDE
public static final int MODULO
public static final int NEGATE
public static final int ABS
public static final int MAX
public static final int MIN
| Constructor Detail |
public RelativeNumericProperty(int operation,
Numeric op1,
Numeric op2)
operation - the operation opcode: ADDITION, SUBTRACTION, ...op1 - the first operand.op2 - the second operand
public RelativeNumericProperty(int operation,
Numeric op)
operation - the operation opcode: NEGATE, ABSop - the operand.| Method Detail |
public double getNumericValue()
throws PropertyException
getNumericValue in interface NumericPropertyExceptionNumeric.getNumericValue()
public double getNumericValue(PercentBaseContext context)
throws PropertyException
Numeric
getNumericValue in interface Numericcontext - The context for the length calculation (for percentage based lengths)
PropertyExceptionNumeric.getNumericValue(PercentBaseContext)public int getDimension()
getDimension in interface Numericpublic boolean isAbsolute()
isAbsolute in interface Numericpublic Length getLength()
getLength in class Propertypublic Numeric getNumeric()
Property
getNumeric in class Propertypublic int getValue()
Numeric
getValue in interface NumericNumeric.getValue()public int getValue(PercentBaseContext context)
Numeric
getValue in interface Numericcontext - the context for the length calculation (for percentage based lengths)
Numeric.getValue(PercentBaseContext)public java.lang.String toString()
toString in class PropertyObject.toString()
|
fop 0.93 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||