Class PercentContext
- java.lang.Object
-
- org.apache.fop.render.rtf.rtflib.tools.PercentContext
-
- All Implemented Interfaces:
PercentBaseContext
public class PercentContext extends java.lang.Object implements PercentBaseContext
PercentBaseContext implementation to track base widths for percentage calculations.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanbaseWidthSetVariable to check if a base width is setprivate java.util.MaplengthMapMap containing the FObj and its widthprivate static org.apache.commons.logging.Loglogprivate java.util.MaptableUnitMapMap containing the Tables and their table units
-
Constructor Summary
Constructors Constructor Description PercentContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.IntegerfindParent(FONode fobj)Searches for the parent object of fobj.intgetBaseLength(int lengthBase, FObj fobj)Returns the available width for a specific FObjvoidsetDimension(FObj fobj)Elements willing to use this context have to register themselves by calling this function.voidsetDimension(FObj fobj, int width)Elements having a width property can call this function if their width is calculated in RTFHandlervoidsetTableUnit(Table table, int tableUnit)Records the calculated table unit for a given table.
-
-
-
Field Detail
-
log
private static org.apache.commons.logging.Log log
-
lengthMap
private java.util.Map lengthMap
Map containing the FObj and its width
-
tableUnitMap
private java.util.Map tableUnitMap
Map containing the Tables and their table units
-
baseWidthSet
private boolean baseWidthSet
Variable to check if a base width is set
-
-
Method Detail
-
getBaseLength
public int getBaseLength(int lengthBase, FObj fobj)Returns the available width for a specific FObj- Specified by:
getBaseLengthin interfacePercentBaseContext- Parameters:
lengthBase- lengthBase not usedfobj- the FObj- Returns:
- Available Width
-
setDimension
public void setDimension(FObj fobj, int width)
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
public void setTableUnit(Table table, int tableUnit)
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
private java.lang.Integer findParent(FONode fobj)
Searches for the parent object of fobj.
-
setDimension
public void setDimension(FObj fobj)
Elements willing to use this context have to register themselves by calling this function.- Parameters:
fobj- the FObj
-
-