Class RtfTable
- java.lang.Object
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTable
-
public class RtfTable extends RtfContainer
Container for RtfRow elements.
This work was authored by Bertrand Delacretaz (bdelacretaz@codeconsult.ch).
-
-
Field Summary
Fields Modifier and Type Field Description private RtfAttributes
borderAttributes
private RtfAttributes
headerAttribs
private int
highestRow
private java.lang.Boolean
isNestedTable
private int
nestedTableDepth
Shows the table depth necessary for nested tablesprivate RtfTableRow
row
private ITableColumnsInfo
tableContext
Added by Boris Poudérous on 07/22/2002 in order to process number-columns-spanned attribute-
Fields inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
attrib, parent, writer
-
-
Constructor Summary
Constructors Constructor Description RtfTable(IRtfTableContainer parent, java.io.Writer w, ITableColumnsInfo tc)
Create an RTF element as a child of given containerRtfTable(IRtfTableContainer parent, java.io.Writer w, RtfAttributes attrs, ITableColumnsInfo tc)
Create an RTF element as a child of given container Modified by Boris Poudérous in order to process 'number-columns-spanned' attribute
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RtfAttributes
getBorderAttributes()
Returns the RtfAttributes for the borders of the table.RtfAttributes
getHeaderAttribs()
ITableColumnsInfo
getITableColumnsInfo()
Added by Boris Poudérous on 07/22/2002int
getNestedTableDepth()
Returns the nested table depth.RtfTableRow
getRow()
RtfAttributes
getRtfAttributes()
Added by Normand Masseboolean
isHighestRow(int id)
boolean
isNestedTable()
RtfTableRow
newTableRow()
Close current row if any and start a new oneRtfTableRow
newTableRow(RtfAttributes attrs)
Close current row if any and start a new onevoid
setBorderAttributes(RtfAttributes attributes)
Sets the RtfAttributes for the borders of the table.void
setHeaderAttribs(RtfAttributes attrs)
Added by Normand Masse Support for table-header attributes (used instead of table attributes)void
setNestedTableDepth(int nestedTableDepth)
Sets the nested table depth.protected void
writeRtfPrefix()
Overridden to write RTF prefix code, what comes before our childrenprotected void
writeRtfSuffix()
Overridden to write RTF suffix code, what comes after our children-
Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer
addChild, containsText, dump, findChildren, getChildCount, getChildren, getOptions, isEmpty, okToWriteRtf, setChildren, setOptions, toString, writeRtfContent
-
Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
close, getParentOfClass, getRtfFile, isClosed, newLine, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNS
-
-
-
-
Field Detail
-
row
private RtfTableRow row
-
highestRow
private int highestRow
-
isNestedTable
private java.lang.Boolean isNestedTable
-
borderAttributes
private RtfAttributes borderAttributes
-
tableContext
private ITableColumnsInfo tableContext
Added by Boris Poudérous on 07/22/2002 in order to process number-columns-spanned attribute
-
nestedTableDepth
private int nestedTableDepth
Shows the table depth necessary for nested tables
-
headerAttribs
private RtfAttributes headerAttribs
-
-
Constructor Detail
-
RtfTable
RtfTable(IRtfTableContainer parent, java.io.Writer w, ITableColumnsInfo tc) throws java.io.IOException
Create an RTF element as a child of given container- Throws:
java.io.IOException
-
RtfTable
RtfTable(IRtfTableContainer parent, java.io.Writer w, RtfAttributes attrs, ITableColumnsInfo tc) throws java.io.IOException
Create an RTF element as a child of given container Modified by Boris Poudérous in order to process 'number-columns-spanned' attribute- Throws:
java.io.IOException
-
-
Method Detail
-
newTableRow
public RtfTableRow newTableRow() throws java.io.IOException
Close current row if any and start a new one- Returns:
- new RtfTableRow
- Throws:
java.io.IOException
- for I/O problems
-
newTableRow
public RtfTableRow newTableRow(RtfAttributes attrs) throws java.io.IOException, FOPException
Close current row if any and start a new one- Parameters:
attrs
- attributs of new RtfTableRow- Returns:
- new RtfTableRow
- Throws:
java.io.IOException
- for I/O problemsFOPException
- if attributes cannot be cloned
-
writeRtfPrefix
protected void writeRtfPrefix() throws java.io.IOException
Overridden to write RTF prefix code, what comes before our children- Overrides:
writeRtfPrefix
in classRtfElement
- Throws:
java.io.IOException
- for I/O problems
-
writeRtfSuffix
protected void writeRtfSuffix() throws java.io.IOException
Overridden to write RTF suffix code, what comes after our children- Overrides:
writeRtfSuffix
in classRtfElement
- Throws:
java.io.IOException
- for I/O problems
-
isHighestRow
public boolean isHighestRow(int id)
- Parameters:
id
- row to check (??)- Returns:
- true if id is the highestRow
-
getITableColumnsInfo
public ITableColumnsInfo getITableColumnsInfo()
Added by Boris Poudérous on 07/22/2002- Returns:
- ITableColumnsInfo for this table
-
setHeaderAttribs
public void setHeaderAttribs(RtfAttributes attrs)
Added by Normand Masse Support for table-header attributes (used instead of table attributes)- Parameters:
attrs
- attributes to be set
-
getHeaderAttribs
public RtfAttributes getHeaderAttribs()
- Returns:
- RtfAttributes of Header
-
getRtfAttributes
public RtfAttributes getRtfAttributes()
Added by Normand Masse- Overrides:
getRtfAttributes
in classRtfElement
- Returns:
- the table-header attributes if they are present, otherwise the parent's attributes are returned normally.
-
isNestedTable
public boolean isNestedTable()
- Returns:
- true if the the table is a nested table
-
getRow
public RtfTableRow getRow()
- Returns:
- Parent row table (for nested tables only)
-
setNestedTableDepth
public void setNestedTableDepth(int nestedTableDepth)
Sets the nested table depth.- Parameters:
nestedTableDepth
- the nested table depth
-
getNestedTableDepth
public int getNestedTableDepth()
Returns the nested table depth.- Returns:
- the nested table depth
-
setBorderAttributes
public void setBorderAttributes(RtfAttributes attributes)
Sets the RtfAttributes for the borders of the table.- Parameters:
attributes
- Border attributes of the table.
-
getBorderAttributes
public RtfAttributes getBorderAttributes()
Returns the RtfAttributes for the borders of the table.- Returns:
- Border attributes of the table.
-
-