Package org.apache.fop.datatypes
Class SimplePercentBaseContext
java.lang.Object
org.apache.fop.datatypes.SimplePercentBaseContext
- All Implemented Interfaces:
PercentBaseContext
Class to implement a simple lookup context for a single percent base value.
-
Constructor Summary
ConstructorsConstructorDescriptionSimplePercentBaseContext(PercentBaseContext parentContext, int lengthBase, int lengthBaseValue) -
Method Summary
Modifier and TypeMethodDescriptionintgetBaseLength(int lengthBase, FObj fobj) Returns the value for the given lengthBase.
-
Constructor Details
-
SimplePercentBaseContext
public SimplePercentBaseContext(PercentBaseContext parentContext, int lengthBase, int lengthBaseValue) - Parameters:
parentContext- the context to be used for all percentages other than lengthBaselengthBase- the particular percentage length base for which this context provides a valuelengthBaseValue- the value to be returned for requests to the given lengthBase
-
-
Method Details
-
getBaseLength
Returns the value for the given lengthBase. Returns the base length for the given length base. Length base should be one of the constants defined inLengthBase.- Specified by:
getBaseLengthin interfacePercentBaseContext- Parameters:
lengthBase- Indicates which type of the base length value is to be returnedfobj- The FO object against which the percentage should be evaluated- Returns:
- The base length value of the given kind
-