Package io.keikai.doc.io.schema.docx
Class DOCXTbl
- java.lang.Object
-
- io.keikai.doc.io.schema.docx.AbstractVisitable
-
- io.keikai.doc.io.schema.docx.AbstractBodyElement
-
- io.keikai.doc.io.schema.docx.DOCXTbl
-
- All Implemented Interfaces:
ICTElement,IDOCXVisitable<java.lang.Object>,IXWPFElement
public class DOCXTbl extends AbstractBodyElement
Internal Use Only.Table Definition.
Represents
w:tblin xml.- Author:
- Jamson Chan
-
-
Constructor Summary
Constructors Constructor Description DOCXTbl(org.apache.poi.xwpf.usermodel.XWPFTable xwpfTable, AbstractBody parent)Create a new Table by given XWPFTable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectaccept(IDOCXVisitor visitor)Accepts a visitor.DOCXTrcreateTableRow()Create a new TableRow under this Table.org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTblgetCT()Returns the CT object of current element.AbstractBodygetParent()Returns the parent element of current element.DOCXTrgetTableRow(int pos)Returns the TableRow at the specified position.java.util.List<DOCXTr>getTableRows()Returns the table rows.DOCXTblPrgetTblPr()Returns the table properties.DOCXTblPrgetTblPr(boolean create)Returns the table properties.java.lang.Double[]getWidths()Returns the widths of the columns.org.apache.poi.xwpf.usermodel.XWPFTablegetXWPF()Returns the XWPF object of current element.booleanisSetTblPr()Returns whether the table properties is set.voidsetTblPr(DOCXTblPr tblPr)Sets the table properties.voidsetWidths(java.lang.Double[] widths)Sets the widths of the columns.-
Methods inherited from class io.keikai.doc.io.schema.docx.AbstractVisitable
addTempData, getTempData
-
-
-
-
Constructor Detail
-
DOCXTbl
public DOCXTbl(org.apache.poi.xwpf.usermodel.XWPFTable xwpfTable, AbstractBody parent)Create a new Table by given XWPFTable.- Parameters:
xwpfTable- the XWPFTable object.
-
-
Method Detail
-
getCT
public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl getCT()
Description copied from interface:ICTElementReturns the CT object of current element.
-
accept
public java.lang.Object accept(IDOCXVisitor visitor)
Description copied from interface:IDOCXVisitableAccepts a visitor.
-
getXWPF
public org.apache.poi.xwpf.usermodel.XWPFTable getXWPF()
Description copied from interface:IXWPFElementReturns the XWPF object of current element.
-
getParent
public AbstractBody getParent()
Description copied from interface:IXWPFElementReturns the parent element of current element.
-
getTblPr
public DOCXTblPr getTblPr()
Returns the table properties.Represents the following element tag in the schema:
w:tblPr.- Returns:
- the table properties.
-
getTblPr
public DOCXTblPr getTblPr(boolean create)
Returns the table properties.Represents the following element tag in the schema:
w:tblPr.- Parameters:
create- whether to create a new table properties if it doesn't exist.- Returns:
- the table properties.
-
setTblPr
public void setTblPr(DOCXTblPr tblPr)
Sets the table properties.Represents the following element tag in the schema:
w:tblPr.- Parameters:
tblPr- the table properties.
-
isSetTblPr
public boolean isSetTblPr()
Returns whether the table properties is set.- Returns:
- whether the table properties is set.
-
getTableRows
public java.util.List<DOCXTr> getTableRows()
Returns the table rows.Represents the following element tag in the schema:
w:tr.- Returns:
- the table rows.
-
getTableRow
public DOCXTr getTableRow(int pos)
Returns the TableRow at the specified position.- Parameters:
pos- the position of the TableRow.- Returns:
- the TableRow at the specified position.
-
createTableRow
public DOCXTr createTableRow()
Create a new TableRow under this Table.- Returns:
- the new TableRow.
-
getWidths
public java.lang.Double[] getWidths()
Returns the widths of the columns.- Returns:
- the widths of the columns.
-
setWidths
public void setWidths(java.lang.Double[] widths)
Sets the widths of the columns.- Parameters:
widths- the widths of the columns.
-
-