|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.xwpf.usermodel.XWPFTableCell
public class XWPFTableCell
XWPFTableCell class.
Nested Class Summary | |
---|---|
static class |
XWPFTableCell.XWPFVertAlign
|
Field Summary | |
---|---|
protected java.util.List<IBodyElement> |
bodyElements
|
protected java.util.List<XWPFParagraph> |
paragraphs
|
protected IBody |
part
|
protected java.util.List<XWPFTable> |
tables
|
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
XWPFParagraph |
addParagraph()
Add a Paragraph to this Table Cell |
void |
addParagraph(XWPFParagraph p)
add a Paragraph to this TableCell |
java.util.List<IBodyElement> |
getBodyElements()
returns an Iterator with paragraphs and tables |
java.lang.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 |
java.util.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()
|
java.util.List<XWPFTable> |
getTables()
Return the table(s) that holds the text of the IBodyPart, for complex cases where a paragraph isn't used. |
java.lang.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(java.lang.String rgbStr)
Set cell color. |
void |
setParagraph(XWPFParagraph p)
|
void |
setText(java.lang.String text)
|
void |
setVerticalAlignment(XWPFTableCell.XWPFVertAlign vAlign)
Set the vertical alignment of the cell. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<XWPFParagraph> paragraphs
protected java.util.List<XWPFTable> tables
protected java.util.List<IBodyElement> bodyElements
protected IBody part
Constructor Detail |
---|
public XWPFTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell, XWPFTableRow tableRow, IBody part)
Method Detail |
---|
@Internal public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc getCTTc()
public java.util.List<IBodyElement> getBodyElements()
getBodyElements
in interface IBody
IBody.getBodyElements()
public void setParagraph(XWPFParagraph p)
public java.util.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 null
getParagraph
in interface IBody
p
- is instance of CTP and is searching for an XWPFParagraph
public void setText(java.lang.String text)
public XWPFTableRow getTableRow()
public void setColor(java.lang.String rgbStr)
rgbStr
- - the desired cell color, in the hex form "RRGGBB".public java.lang.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 java.util.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.apache.poi.xwpf.usermodel.XWPFTable)
public java.lang.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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |