public class RtfTableCell extends RtfContainer implements IRtfParagraphContainer, IRtfListContainer, IRtfTableContainer, IRtfExternalGraphicContainer
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_CELL_WIDTH |
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
|
m_attrib, m_parent, m_writer| Constructor and Description |
|---|
RtfTableCell(RtfTableRow parent,
java.io.Writer w,
int cellWidth,
int idNum)
Create an RTF element as a child of given container
|
RtfTableCell(RtfTableRow parent,
java.io.Writer w,
int cellWidth,
RtfAttributes attrs,
int idNum)
Create an RTF element as a child of given container
|
| Modifier and Type | Method and Description |
|---|---|
(package private) int |
getCellWidth()
get cell width
|
int |
getHMerge()
get horizontal cell merging status
|
int |
getVMerge()
get vertical cell merging status
|
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
|
(package private) boolean |
paragraphNeedsPar(RtfParagraph p)
true if the "par" control word must be written for given RtfParagraph
(which is not the case for the last non-empty paragraph of the cell)
|
void |
setHMerge(int mergeStatus)
set horizontal cell merging status
|
void |
setVMerge(int mergeStatus)
set vertical cell merging status
|
(package private) int |
writeCellDef(int widthOffset)
used by RtfTableRow to write the
|
protected void |
writeRtfContent()
overridden so that nested tables cause extra rows to be added after the row
that contains this cell
disabled for V0.3 - nested table support is not done yet
|
protected void |
writeRtfSuffix()
the "cell" control word marks the end of a cell
|
addChild, containsText, dump, getChildCount, getChildren, getOptions, okToWriteRtf, setChildren, setOptions, toStringclose, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeRtfPrefix, 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
RtfTableCell(RtfTableRow parent, java.io.Writer w, int cellWidth, int idNum) throws java.io.IOException
java.io.IOExceptionRtfTableCell(RtfTableRow parent, java.io.Writer w, int cellWidth, RtfAttributes attrs, int idNum) throws java.io.IOException
java.io.IOExceptionpublic RtfParagraph newParagraph(RtfAttributes attrs) throws java.io.IOException
newParagraph in interface IRtfParagraphContainerjava.io.IOExceptionpublic RtfExternalGraphic newImage() throws java.io.IOException
newImage in interface IRtfExternalGraphicContainerjava.io.IOException - On errorpublic RtfParagraph newParagraph() throws java.io.IOException
newParagraph in interface IRtfParagraphContainerjava.io.IOExceptionpublic RtfList newList(RtfAttributes attrib) throws java.io.IOException
newList in interface IRtfListContainerjava.io.IOExceptionpublic RtfTable newTable(ITableColumnsInfo tc) throws java.io.IOException
newTable in interface IRtfTableContainerjava.io.IOExceptionpublic RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc) throws java.io.IOException
newTable in interface IRtfTableContainertc - added by Boris Poud?rous on july 2002 in order to process number-columns-spanned attributejava.io.IOExceptionint writeCellDef(int widthOffset)
throws java.io.IOException
widthOffset - sum of the widths of preceeding cells in same rowjava.io.IOExceptionprotected void writeRtfSuffix()
throws java.io.IOException
writeRtfSuffix in class RtfElementjava.io.IOExceptionpublic void setVMerge(int mergeStatus)
public int getVMerge()
public void setHMerge(int mergeStatus)
public int getHMerge()
int getCellWidth()
protected void writeRtfContent()
throws java.io.IOException
writeRtfContent in class RtfContainerjava.io.IOExceptionpublic boolean isEmpty()
isEmpty in class RtfContainerboolean paragraphNeedsPar(RtfParagraph p)