Class TableContext
- java.lang.Object
-
- org.apache.fop.render.rtf.rtflib.tools.TableContext
-
- All Implemented Interfaces:
ITableColumnsInfo
public class TableContext extends java.lang.Object implements ITableColumnsInfo
Used when handling fo:table to hold information to build the table.
This work was authored by Bertrand Delacretaz (bdelacretaz@codeconsult.ch), Ed Trembicki-Guy (guye@dnb.com), Boris Poudérous (boris.pouderous@eads-telecom.com), and Peter Herweg (pherweg@web.de).
This class was originally developed for the JFOR project and is now integrated into FOP.
-
-
Field Summary
-
Fields inherited from interface org.apache.fop.render.rtf.rtflib.rtfdoc.ITableColumnsInfo
INVALID_COLUMN_WIDTH
-
-
Constructor Summary
Constructors Constructor Description TableContext(BuilderContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecreaseRowSpannings()Added by Peter Herweg on 2002-06-29 This function is called after each finished table-row.intgetColumnIndex()RtfAttributesgetColumnRowSpanningAttrs()java.lang.IntegergetColumnRowSpanningNumber()floatgetColumnWidth()Get current column width according to column iteration indexbooleangetFirstSpanningCol()booleangetNextRowBelongsToHeader()intgetNumberOfColumns()voidselectFirstColumn()Reset the column iteration index, meant to be called when creating a new row The 'public' modifier has been added by Boris Poudérous for 'number-columns-spanned' processingvoidselectNextColumn()Increment the column iteration index The 'public' modifier has been added by Boris Poudérous for 'number-columns-spanned' processingvoidsetColumnIndex(int index)Set current column index.voidsetCurrentColumnRowSpanning(java.lang.Integer iRowSpanning, RtfAttributes attrs)voidsetCurrentFirstSpanningCol(boolean bFirstSpanningCol)voidsetNextColumnRowSpanning(java.lang.Integer iRowSpanning, RtfAttributes attrs)voidsetNextColumnWidth(java.lang.Float width)Adds a column and sets its width.voidsetNextFirstSpanningCol(boolean bFirstSpanningCol)voidsetNextRowBelongsToHeader(boolean value)
-
-
-
Constructor Detail
-
TableContext
public TableContext(BuilderContext ctx)
- Parameters:
ctx- BuilderContext
-
-
Method Detail
-
setNextRowBelongsToHeader
public void setNextRowBelongsToHeader(boolean value)
- Parameters:
value- Specifies, if next row belongs to header
-
getNextRowBelongsToHeader
public boolean getNextRowBelongsToHeader()
- Returns:
- true, if next row belongs to header
-
setNextColumnWidth
public void setNextColumnWidth(java.lang.Float width)
Adds a column and sets its width.- Parameters:
width- Width of next column
-
getColumnRowSpanningAttrs
public RtfAttributes getColumnRowSpanningAttrs()
- Returns:
- RtfAttributes of current row-spanning cell
-
getColumnRowSpanningNumber
public java.lang.Integer getColumnRowSpanningNumber()
- Returns:
- Number of currently spanned rows
-
getFirstSpanningCol
public boolean getFirstSpanningCol()
- Specified by:
getFirstSpanningColin interfaceITableColumnsInfo- Returns:
- true, if it's the first of multiple spanning columns
-
setCurrentColumnRowSpanning
public void setCurrentColumnRowSpanning(java.lang.Integer iRowSpanning, RtfAttributes attrs)- Parameters:
iRowSpanning- number of rows to spanattrs- RtfAttributes of row-spanning cell
-
setNextColumnRowSpanning
public void setNextColumnRowSpanning(java.lang.Integer iRowSpanning, RtfAttributes attrs)- Parameters:
iRowSpanning- number of rows to span in next columnattrs- RtfAttributes of row-spanning cell
-
setCurrentFirstSpanningCol
public void setCurrentFirstSpanningCol(boolean bFirstSpanningCol)
- Parameters:
bFirstSpanningCol- specifies, if it's the first of multiple spanned columns
-
setNextFirstSpanningCol
public void setNextFirstSpanningCol(boolean bFirstSpanningCol)
- Parameters:
bFirstSpanningCol- specifies, if it's the first of multiple spanned columns
-
decreaseRowSpannings
public void decreaseRowSpannings()
Added by Peter Herweg on 2002-06-29 This function is called after each finished table-row. It decreases all values in colRowSpanningNumber by 1. If a value reaches 0 row-spanning is finished, and the value won't be decreased anymore.
-
selectFirstColumn
public void selectFirstColumn()
Reset the column iteration index, meant to be called when creating a new row The 'public' modifier has been added by Boris Poudérous for 'number-columns-spanned' processing- Specified by:
selectFirstColumnin interfaceITableColumnsInfo
-
selectNextColumn
public void selectNextColumn()
Increment the column iteration index The 'public' modifier has been added by Boris Poudérous for 'number-columns-spanned' processing- Specified by:
selectNextColumnin interfaceITableColumnsInfo
-
getColumnWidth
public float getColumnWidth()
Get current column width according to column iteration index- Specified by:
getColumnWidthin interfaceITableColumnsInfo- Returns:
- INVALID_COLUMN_WIDTH if we cannot find the value The 'public' modifier has been added by Boris Poudérous for 'number-columns-spanned' processing
-
setColumnIndex
public void setColumnIndex(int index)
Set current column index.- Parameters:
index- New column index
-
getColumnIndex
public int getColumnIndex()
- Specified by:
getColumnIndexin interfaceITableColumnsInfo- Returns:
- Index of current column
-
getNumberOfColumns
public int getNumberOfColumns()
- Specified by:
getNumberOfColumnsin interfaceITableColumnsInfo- Returns:
- Number of columns
-
-