Class PercentContext
java.lang.Object
org.apache.fop.render.rtf.rtflib.tools.PercentContext
- All Implemented Interfaces:
PercentBaseContext
PercentBaseContext implementation to track base widths for percentage calculations.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Integer
findParent
(FONode fobj) Searches for the parent object of fobj.int
getBaseLength
(int lengthBase, FObj fobj) Returns the available width for a specific FObjvoid
setDimension
(FObj fobj) Elements willing to use this context have to register themselves by calling this function.void
setDimension
(FObj fobj, int width) Elements having a width property can call this function if their width is calculated in RTFHandlervoid
setTableUnit
(Table table, int tableUnit) Records the calculated table unit for a given table.
-
Field Details
-
log
private static org.apache.commons.logging.Log log -
lengthMap
Map containing the FObj and its width -
tableUnitMap
Map containing the Tables and their table units -
baseWidthSet
private boolean baseWidthSetVariable to check if a base width is set
-
-
Constructor Details
-
PercentContext
public PercentContext()
-
-
Method Details
-
getBaseLength
Returns the available width for a specific FObj- Specified by:
getBaseLength
in interfacePercentBaseContext
- Parameters:
lengthBase
- lengthBase not usedfobj
- the FObj- Returns:
- Available Width
-
setDimension
Elements having a width property can call this function if their width is calculated in RTFHandler- Parameters:
fobj
- the FObjwidth
- width of the FObj (in millipoints)
-
setTableUnit
Records the calculated table unit for a given table.- Parameters:
table
- the table for which the table unit is settableUnit
- the table unit value (in millipoints)
-
findParent
Searches for the parent object of fobj. -
setDimension
Elements willing to use this context have to register themselves by calling this function.- Parameters:
fobj
- the FObj
-