public class RtfTableCell extends RtfContainer implements IRtfParagraphContainer, IRtfListContainer, IRtfTableContainer, IRtfExternalGraphicContainer, IRtfTextrunContainer
A cell in an RTF table, container for paragraphs, lists, etc.
This work was authored by Bertrand Delacretaz (bdelacretaz@codeconsult.ch).
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CELL_WIDTH
default cell width (in twips ??)
|
static int |
MERGE_START
cell merging: this cell is the start of a range of merged cells
|
static int |
MERGE_WITH_PREVIOUS
cell merging: this cell is part of (but not the start of) a range of merged cells
|
static int |
NO_MERGE
cell merging: this cell is not merged
|
attrib, parent, writer| Modifier and Type | Method and Description |
|---|---|
void |
finish()
The last paragraph break was just stored before,
now the control word is really switched
|
int |
getHMerge() |
RtfTableRow |
getRow()
Get the parent row.
|
RtfTextrun |
getTextrun()
Returns the current RtfTextrun object.
|
int |
getVMerge() |
boolean |
isEmpty()
A table cell always contains "useful" content, as it is here to take some
space in a row.
|
RtfExternalGraphic |
newImage()
Start a new external graphic after closing current paragraph, list and table
|
RtfList |
newList(RtfAttributes attrib)
Start a new list after closing current paragraph, list and table
|
RtfParagraph |
newParagraph()
Start a new paragraph with default attributes after closing current
paragraph, list and table
|
RtfParagraph |
newParagraph(RtfAttributes attrs)
Start a new paragraph after closing current current paragraph, list and table
|
RtfTable |
newTable(ITableColumnsInfo tc)
Start a new nested table after closing current paragraph, list and table
|
RtfTable |
newTable(RtfAttributes attrs,
ITableColumnsInfo tc)
Start a new nested table after closing current paragraph, list and table
|
void |
setHMerge(int mergeStatus)
Set horizontal cell merging status
|
void |
setLastParagraph(RtfParagraphBreak parBreak)
The table cell decides whether or not a newly added paragraph break
will be used to write the cell-end control word.
|
void |
setVMerge(int mergeStatus) |
protected void |
writeRtfContent()
Overriden to avoid writing any it's a merged cell.
|
protected void |
writeRtfPrefix()
Called before writeRtfContent; overriden to avoid writing
any it's a merged cell.
|
protected void |
writeRtfSuffix()
The "cell" control word marks the end of a cell
|
addChild, findChildren, getChildCount, getChildren, okToWriteRtf, setChildren, setOptions, toStringclose, getParentOfClass, getRtfAttributes, newLine, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNSpublic static final int DEFAULT_CELL_WIDTH
public static final int NO_MERGE
public static final int MERGE_START
public static final int MERGE_WITH_PREVIOUS
public RtfParagraph newParagraph(RtfAttributes attrs) throws IOException
newParagraph in interface IRtfParagraphContainerattrs - attributes of new RtfParagraphIOException - for I/O problemspublic RtfExternalGraphic newImage() throws IOException
newImage in interface IRtfExternalGraphicContainerIOException - for I/O problemspublic RtfParagraph newParagraph() throws IOException
newParagraph in interface IRtfParagraphContainerIOException - for I/O problemspublic RtfList newList(RtfAttributes attrib) throws IOException
newList in interface IRtfListContainerattrib - attributes for new RtfListIOException - for I/O problemspublic RtfTable newTable(ITableColumnsInfo tc) throws IOException
newTable in interface IRtfTableContainertc - table column info for new RtfTableIOException - for I/O problemspublic RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc) throws IOException
newTable in interface IRtfTableContainerattrs - attributes of new RtfTabletc - table column info for new RtfTableIOException - for I/O problemsprotected void writeRtfContent()
throws IOException
writeRtfContent in class RtfContainerIOException - for I/O problemsprotected void writeRtfPrefix()
throws IOException
writeRtfPrefix in class RtfElementIOException - for I/O problemsprotected void writeRtfSuffix()
throws IOException
writeRtfSuffix in class RtfElementIOException - for I/O problemspublic void setVMerge(int mergeStatus)
mergeStatus - vertical cell merging status to setpublic int getVMerge()
public void setHMerge(int mergeStatus)
mergeStatus - mergeStatus to setpublic int getHMerge()
public boolean isEmpty()
isEmpty in class RtfContainerpublic RtfTextrun getTextrun() throws IOException
getTextrun in interface IRtfTextrunContainerIOException - Thrown when an IO-problem occurspublic RtfTableRow getRow()
public void setLastParagraph(RtfParagraphBreak parBreak)
parBreak - the paragraph break elementpublic void finish()
Copyright © 2023 Apache Software Foundation. All rights reserved.