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 IBody
IBody.getBodyElements()
public void setParagraph(XWPFParagraph p)
public List<XWPFParagraph> getParagraphs()
getParagraphs
in interface IBody
public 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 IBody
p
- 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 IBody
cursor
- public XWPFTable insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
IBody
insertNewTbl
in interface IBody
public XWPFParagraph getParagraphArray(int pos)
IBody
getParagraphArray
in interface IBody
IBody.getParagraphArray(int)
public POIXMLDocumentPart getPart()
getPart
in interface IBody
IBody.getPart()
public BodyType getPartType()
IBody
getPartType
in interface IBody
IBody.getPartType()
public XWPFTable getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)
getTable
in interface IBody
IBody.getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl)
public XWPFTable getTableArray(int pos)
IBody
getTableArray
in interface IBody
IBody.getTableArray(int)
public List<XWPFTable> getTables()
IBody
getTables
in interface IBody
IBody.getTables()
public void insertTable(int pos, XWPFTable table)
insertTable
in interface IBody
IBody.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 IBody
public XWPFDocument getXWPFDocument()
IBody
getXWPFDocument
in interface IBody
Copyright © 2020. All rights reserved.