| Modifier and Type | Class and Description |
|---|---|
static class |
XWPFTableCell.XWPFVertAlign |
| Modifier and Type | Field and Description |
|---|---|
protected List<IBodyElement> |
bodyElements |
protected List<XWPFParagraph> |
paragraphs |
protected IBody |
part |
protected List<XWPFTable> |
tables |
| Constructor and Description |
|---|
XWPFTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell,
XWPFTableRow tableRow,
IBody part)
If a table cell does not include at least one block-level element, then this document shall be considered corrupt
|
| Modifier and Type | Method and Description |
|---|---|
XWPFParagraph |
addParagraph()
Add a Paragraph to this Table Cell
|
void |
addParagraph(XWPFParagraph p)
add a Paragraph to this TableCell
|
List<IBodyElement> |
getBodyElements()
returns an Iterator with paragraphs and tables
|
String |
getColor()
Get cell color.
|
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc |
getCTTc() |
XWPFParagraph |
getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
if there is a corresponding
XWPFParagraph of the parameter ctTable in the paragraphList of this table
the method will return this paragraph
if there is no corresponding XWPFParagraph the method will return null |
XWPFParagraph |
getParagraphArray(int pos)
Returns the paragraph that of position pos
|
List<XWPFParagraph> |
getParagraphs()
returns a list of paragraphs
|
POIXMLDocumentPart |
getPart()
get the to which the TableCell belongs
|
BodyType |
getPartType()
get the PartType of the body, for example
DOCUMENT, HEADER, FOOTER, FOOTNOTE,
|
XWPFTable |
getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)
get a table by its CTTbl-Object
|
XWPFTable |
getTableArray(int pos)
Returns the table at position pos
|
XWPFTableCell |
getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
get the TableCell which belongs to the TableCell
|
XWPFTableRow |
getTableRow() |
List<XWPFTable> |
getTables()
Return the table(s) that holds the text
of the IBodyPart, for complex cases
where a paragraph isn't used.
|
String |
getText() |
XWPFTableCell.XWPFVertAlign |
getVerticalAlignment()
Get the vertical alignment of the cell.
|
XWPFDocument |
getXWPFDocument()
Return XWPFDocument
|
XWPFParagraph |
insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
add a new paragraph at position of the cursor
|
XWPFTable |
insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
inserts a new Table at the cursor position.
|
void |
insertTable(int pos,
XWPFTable table)
inserts an existing XWPFTable to the arrays bodyElements and tables
|
void |
removeParagraph(int pos)
removes a paragraph of this tablecell
|
void |
setColor(String rgbStr)
Set cell color.
|
void |
setParagraph(XWPFParagraph p) |
void |
setText(String text) |
void |
setVerticalAlignment(XWPFTableCell.XWPFVertAlign vAlign)
Set the vertical alignment of the cell.
|
protected List<XWPFParagraph> paragraphs
protected List<IBodyElement> bodyElements
protected IBody part
public XWPFTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell,
XWPFTableRow tableRow,
IBody part)
@Internal public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc getCTTc()
public List<IBodyElement> getBodyElements()
getBodyElements in interface IBodyIBody.getBodyElements()public void setParagraph(XWPFParagraph p)
public List<XWPFParagraph> getParagraphs()
getParagraphs in interface IBodypublic XWPFParagraph addParagraph()
public void addParagraph(XWPFParagraph p)
p - the paragaph which has to be addedpublic void removeParagraph(int pos)
pos - public XWPFParagraph getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
XWPFParagraph of the parameter ctTable in the paragraphList of this table
the method will return this paragraph
if there is no corresponding XWPFParagraph the method will return nullgetParagraph in interface IBodyp - is instance of CTP and is searching for an XWPFParagraphpublic void setText(String text)
public XWPFTableRow getTableRow()
public void setColor(String rgbStr)
rgbStr - - the desired cell color, in the hex form "RRGGBB".public String getColor()
public void setVerticalAlignment(XWPFTableCell.XWPFVertAlign vAlign)
vAlign - - the desired alignment enum valuepublic XWPFTableCell.XWPFVertAlign getVerticalAlignment()
public XWPFParagraph insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
insertNewParagraph in interface IBodycursor - public XWPFTable insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
IBodyinsertNewTbl in interface IBodypublic XWPFParagraph getParagraphArray(int pos)
IBodygetParagraphArray in interface IBodyIBody.getParagraphArray(int)public POIXMLDocumentPart getPart()
getPart in interface IBodyIBody.getPart()public BodyType getPartType()
IBodygetPartType in interface IBodyIBody.getPartType()public XWPFTable getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)
getTable in interface IBodyIBody.getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl)public XWPFTable getTableArray(int pos)
IBodygetTableArray in interface IBodyIBody.getTableArray(int)public List<XWPFTable> getTables()
IBodygetTables in interface IBodyIBody.getTables()public void insertTable(int pos,
XWPFTable table)
insertTable in interface IBodyIBody.insertTable(int, org.zkoss.poi.xwpf.usermodel.XWPFTable)public String getText()
public XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
getTableCell in interface IBodypublic XWPFDocument getXWPFDocument()
IBodygetXWPFDocument in interface IBodyCopyright © 2020. All rights reserved.