|
|||||||||
| Home >> All >> org >> jfor >> jfor >> rtflib >> [ rtfdoc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jfor.jfor.rtflib.rtfdoc
Class RtfTableCell

java.lang.Objectorg.jfor.jfor.rtflib.rtfdoc.RtfElement
org.jfor.jfor.rtflib.rtfdoc.RtfContainer
org.jfor.jfor.rtflib.rtfdoc.RtfTableCell
- All Implemented Interfaces:
- IRtfExternalGraphicContainer, IRtfListContainer, IRtfParagraphContainer, IRtfTableContainer
- public class RtfTableCell
- extends RtfContainer
- implements IRtfParagraphContainer, IRtfListContainer, IRtfTableContainer, IRtfExternalGraphicContainer
- extends RtfContainer
A cell in an RTF table, container for paragraphs, lists, etc.
| Field Summary | |
static int |
DEFAULT_CELL_WIDTH
|
private int |
id
|
private int |
m_cellWidth
cell width in twips |
private RtfExternalGraphic |
m_externalGraphic
|
private int |
m_hMerge
|
private RtfList |
m_list
|
private RtfParagraph |
m_paragraph
|
private RtfTableRow |
m_parentRow
|
private RtfTable |
m_table
|
private int |
m_vMerge
cell merging has three states |
private int |
m_widthOffset
|
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 |
private boolean |
set_center
|
private boolean |
set_right
|
| Fields inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfContainer |
|
| Fields inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfElement |
m_attrib, m_parent, m_writer |
| Constructor Summary | |
(package private) |
RtfTableCell(RtfTableRow parent,
java.io.Writer w,
int cellWidth,
int idNum)
Create an RTF element as a child of given container |
(package private) |
RtfTableCell(RtfTableRow parent,
java.io.Writer w,
int cellWidth,
RtfAttributes attrs,
int idNum)
Create an RTF element as a child of given container |
| Method Summary | |
private void |
closeAll()
|
private void |
closeCurrentExternalGraphic()
|
private void |
closeCurrentList()
|
private void |
closeCurrentParagraph()
|
private void |
closeCurrentTable()
|
(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(org.jfor.jfor.interfaces.ITableColumnsInfo tc)
start a new nested table after closing current paragraph, list and table |
RtfTable |
newTable(RtfAttributes attrs,
org.jfor.jfor.interfaces.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 |
| Methods inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfContainer |
addChild, containsText, dump, getChildCount, getChildren, getOptions, okToWriteRtf, setChildren, setOptions, toString |
| Methods inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfElement |
close, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeRtfPrefix, writeStarControlWord, writeStarControlWordNS |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
m_paragraph
private RtfParagraph m_paragraph
m_list
private RtfList m_list
m_table
private RtfTable m_table
m_externalGraphic
private RtfExternalGraphic m_externalGraphic
m_parentRow
private final RtfTableRow m_parentRow
set_center
private boolean set_center
set_right
private boolean set_right
id
private int id
DEFAULT_CELL_WIDTH
public static final int DEFAULT_CELL_WIDTH
- See Also:
- Constant Field Values
m_cellWidth
private int m_cellWidth
- cell width in twips
m_widthOffset
private int m_widthOffset
m_vMerge
private int m_vMerge
- cell merging has three states
m_hMerge
private int m_hMerge
NO_MERGE
public static final int NO_MERGE
- cell merging: this cell is not merged
- See Also:
- Constant Field Values
MERGE_START
public static final int MERGE_START
- cell merging: this cell is the start of a range of merged cells
- See Also:
- Constant Field Values
MERGE_WITH_PREVIOUS
public static final int MERGE_WITH_PREVIOUS
- cell merging: this cell is part of (but not the start of) a range of merged cells
- See Also:
- Constant Field Values
| Constructor Detail |
RtfTableCell
RtfTableCell(RtfTableRow parent, java.io.Writer w, int cellWidth, int idNum) throws java.io.IOException
- Create an RTF element as a child of given container
RtfTableCell
RtfTableCell(RtfTableRow parent, java.io.Writer w, int cellWidth, RtfAttributes attrs, int idNum) throws java.io.IOException
- Create an RTF element as a child of given container
| Method Detail |
newParagraph
public RtfParagraph newParagraph(RtfAttributes attrs) throws java.io.IOException
- start a new paragraph after closing current current paragraph, list and table
- Specified by:
newParagraphin interfaceIRtfParagraphContainer
newImage
public RtfExternalGraphic newImage() throws java.io.IOException
- start a new external graphic after closing current paragraph, list and table
- Specified by:
newImagein interfaceIRtfExternalGraphicContainer
newParagraph
public RtfParagraph newParagraph() throws java.io.IOException
- start a new paragraph with default attributes after closing current paragraph, list and table
- Specified by:
newParagraphin interfaceIRtfParagraphContainer
newList
public RtfList newList(RtfAttributes attrib) throws java.io.IOException
- start a new list after closing current paragraph, list and table
- Specified by:
newListin interfaceIRtfListContainer
newTable
public RtfTable newTable(org.jfor.jfor.interfaces.ITableColumnsInfo tc) throws java.io.IOException
- start a new nested table after closing current paragraph, list and table
- Specified by:
newTablein interfaceIRtfTableContainer
newTable
public RtfTable newTable(RtfAttributes attrs, org.jfor.jfor.interfaces.ITableColumnsInfo tc) throws java.io.IOException
- start a new nested table after closing current paragraph, list and table
- Specified by:
newTablein interfaceIRtfTableContainer
writeCellDef
int writeCellDef(int widthOffset)
throws java.io.IOException
- used by RtfTableRow to write the
cell definition control words
writeRtfSuffix
protected void writeRtfSuffix()
throws java.io.IOException
- the "cell" control word marks the end of a cell
- Overrides:
writeRtfSuffixin classRtfElement
closeCurrentParagraph
private void closeCurrentParagraph()
throws java.io.IOException
closeCurrentList
private void closeCurrentList()
throws java.io.IOException
closeCurrentTable
private void closeCurrentTable()
throws java.io.IOException
closeCurrentExternalGraphic
private void closeCurrentExternalGraphic()
throws java.io.IOException
closeAll
private void closeAll()
throws java.io.IOException
setVMerge
public void setVMerge(int mergeStatus)
- set vertical cell merging status
getVMerge
public int getVMerge()
- get vertical cell merging status
setHMerge
public void setHMerge(int mergeStatus)
- set horizontal cell merging status
getHMerge
public int getHMerge()
- get horizontal cell merging status
getCellWidth
int getCellWidth()
- get cell width
writeRtfContent
protected void writeRtfContent()
throws java.io.IOException
- 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
- Overrides:
writeRtfContentin classRtfContainer
isEmpty
public boolean isEmpty()
- A table cell always contains "useful" content, as it is here to take some
space in a row.
Use containsText() to find out if there is really some useful content in the cell.
TODO: containsText could use the original isEmpty implementation?
- Overrides:
isEmptyin classRtfContainer
paragraphNeedsPar
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)
|
|||||||||
| Home >> All >> org >> jfor >> jfor >> rtflib >> [ rtfdoc overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC