Package org.apache.fop.fo.properties
Class EnumLength
- java.lang.Object
-
- org.apache.fop.fo.properties.Property
-
- org.apache.fop.fo.properties.LengthProperty
-
- org.apache.fop.fo.properties.EnumLength
-
public class EnumLength extends LengthProperty
A length quantity in XSL which is specified as an enum, such as "auto"
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.fop.fo.properties.LengthProperty
LengthProperty.Maker
-
-
Constructor Summary
Constructors Constructor Description EnumLength(Property enumProperty)
Construct an enumerated length from an enum property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getEnum()
This method expects to be overridden by subclassesdouble
getNumericValue()
Return the value of this Numericdouble
getNumericValue(PercentBaseContext context)
Return the value of this Numericjava.lang.Object
getObject()
This method expects to be overridden by subclassesjava.lang.String
getString()
This method expects to be overridden by subclasses.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 true if the numeric is an absolute value.-
Methods inherited from class org.apache.fop.fo.properties.LengthProperty
getDimension, getLength, getNumeric
-
Methods inherited from class org.apache.fop.fo.properties.Property
getCharacter, getColor, getCondLength, getKeep, getLengthPair, getLengthRange, getList, getNCname, getNumber, getSpace, getSpecifiedValue, isAuto, setSpecifiedValue, toString
-
-
-
-
Constructor Detail
-
EnumLength
public EnumLength(Property enumProperty)
Construct an enumerated length from an enum property.- Parameters:
enumProperty
- the enumeration property
-
-
Method Detail
-
getEnum
public int getEnum()
This method expects to be overridden by subclasses
-
isAbsolute
public boolean isAbsolute()
Description copied from interface:Numeric
Return true if the numeric is an absolute value. Relative values are percentages and table-column-units. All other numerics are absolute.- Returns:
- true if absolute
-
getValue
public int getValue()
Returns the length in 1/1000ths of a point (millipoints)- Returns:
- the length in millipoints
-
getValue
public int getValue(PercentBaseContext context)
Returns the length in 1/1000ths of a point (millipoints)- Parameters:
context
- The context for the length calculation (for percentage based lengths)- Returns:
- the length in millipoints
-
getNumericValue
public double getNumericValue()
Return the value of this Numeric- Returns:
- the computed value.
-
getNumericValue
public double getNumericValue(PercentBaseContext context)
Return the value of this Numeric- Parameters:
context
- The context for the length calculation (for percentage based lengths)- Returns:
- the computed value.
-
getString
public java.lang.String getString()
This method expects to be overridden by subclasses.
-
getObject
public java.lang.Object getObject()
This method expects to be overridden by subclasses- Overrides:
getObject
in classLengthProperty
- Returns:
- this.length cast as an Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-