|
fop 2.2 | |||||||||
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
public class 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
ABS |
static int |
ADDITION
ADDITION |
static int |
DIVIDE
DIVIDE |
static int |
MAX
MAX |
static int |
MIN
MIN |
static int |
MODULO
MODULO |
static int |
MULTIPLY
MULTIPLY |
static int |
NEGATE
NEGATE |
static int |
SUBTRACTION
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 | |
---|---|
boolean |
equals(java.lang.Object obj)
|
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 |
double |
getTableUnits()
Return the number of table units which are included in this length specification. |
int |
getValue()
Returns the length in 1/1000ths of a point (millipoints) |
int |
getValue(PercentBaseContext context)
Returns the length in 1/1000ths of a point (millipoints) |
int |
hashCode()
|
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, finalize, getClass, 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 operandpublic RelativeNumericProperty(int operation, Numeric op)
operation
- the operation opcode: NEGATE, ABSop
- the operand.Method Detail |
---|
public double getNumericValue()
getNumericValue
in interface Numeric
public double getNumericValue(PercentBaseContext context)
getNumericValue
in interface Numeric
context
- The context for the length calculation (for percentage based lengths)
public int getDimension()
getDimension
in interface Numeric
public boolean isAbsolute()
isAbsolute
in interface Numeric
public Length getLength()
getLength
in class Property
public Numeric getNumeric()
Property
getNumeric
in class Property
public int getValue()
getValue
in interface Length
getValue
in interface Numeric
public int getValue(PercentBaseContext context)
getValue
in interface Length
getValue
in interface Numeric
context
- The context for the length calculation (for percentage based lengths)
public double getTableUnits()
If this value is not 0, the actual value of the Length cannot be known without looking at all of the columns in the table to determine the value of a "table-unit".
public java.lang.String toString()
toString
in class Property
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
fop 2.2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |