org.apache.poi.xwpf.usermodel
Class XWPFTableRow
- java.lang.Object
-
- org.apache.poi.xwpf.usermodel.XWPFTableRow
-
public class XWPFTableRow extends java.lang.ObjectA row within anXWPFTable. Rows mostly just have sizings and stylings, the interesting content lives inside the childXWPFTableCells
-
-
Constructor Summary
Constructors Constructor and Description XWPFTableRow(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow row, XWPFTable table)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description XWPFTableCelladdNewTableCell()adds a new TableCell at the end of this tableRowXWPFTableCellcreateCell()create a new XWPFTableCell and add it to the tableCell-list of this tableRowXWPFTableCellgetCell(int pos)org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRowgetCtRow()intgetHeight()This element specifies the height of the current table row within the current table.XWPFTablegetTable()XWPFTableCellgetTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)returns the XWPFTableCell which belongs to the CTTC cell if there is no XWPFTableCell which belongs to the parameter CTTc cell null will be returnedjava.util.List<XWPFTableCell>getTableCells()create and return a list of all XWPFTableCell who belongs to this rowjava.util.List<ICell>getTableICells()create and return a list of all XWPFTableCell who belongs to this rowbooleanisCantSplitRow()Return true if the "can't split row" value is true.booleanisRepeatHeader()Return true if a table's header row should be repeated at the top of a table split across pages.voidremoveCell(int pos)voidsetCantSplitRow(boolean split)This attribute controls whether to allow table rows to split across pages.voidsetHeight(int height)This element specifies the height of the current table row within the current table.voidsetRepeatHeader(boolean repeat)This attribute controls whether to repeat a table's header row at the top of a table split across pages.
-
-
-
Constructor Detail
-
XWPFTableRow
public XWPFTableRow(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow row, XWPFTable table)
-
-
Method Detail
-
getCtRow
@Internal public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow getCtRow()
-
createCell
public XWPFTableCell createCell()
create a new XWPFTableCell and add it to the tableCell-list of this tableRow- Returns:
- the newly created XWPFTableCell
-
getCell
public XWPFTableCell getCell(int pos)
-
removeCell
public void removeCell(int pos)
-
addNewTableCell
public XWPFTableCell addNewTableCell()
adds a new TableCell at the end of this tableRow
-
setHeight
public void setHeight(int height)
This element specifies the height of the current table row within the current table. This height shall be used to determine the resulting height of the table row, which may be absolute or relative (depending on its attribute values). If omitted, then the table row shall automatically resize its height to the height required by its contents (the equivalent of an hRule value of auto).- Parameters:
height-
-
getHeight
public int getHeight()
This element specifies the height of the current table row within the current table. This height shall be used to determine the resulting height of the table row, which may be absolute or relative (depending on its attribute values). If omitted, then the table row shall automatically resize its height to the height required by its contents (the equivalent of an hRule value of auto).- Returns:
- height
-
getTable
public XWPFTable getTable()
-
getTableICells
public java.util.List<ICell> getTableICells()
create and return a list of all XWPFTableCell who belongs to this row- Returns:
- a list of
XWPFTableCell
-
getTableCells
public java.util.List<XWPFTableCell> getTableCells()
create and return a list of all XWPFTableCell who belongs to this row- Returns:
- a list of
XWPFTableCell
-
getTableCell
public XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
returns the XWPFTableCell which belongs to the CTTC cell if there is no XWPFTableCell which belongs to the parameter CTTc cell null will be returned
-
setCantSplitRow
public void setCantSplitRow(boolean split)
This attribute controls whether to allow table rows to split across pages. The logic for this attribute is a little unusual: a true value means DON'T allow rows to split, false means allow rows to split.- Parameters:
split- - if true, don't allow rows to be split. If false, allow rows to be split.
-
isCantSplitRow
public boolean isCantSplitRow()
Return true if the "can't split row" value is true. The logic for this attribute is a little unusual: a TRUE value means DON'T allow rows to split, FALSE means allow rows to split.- Returns:
- true if rows can't be split, false otherwise.
-
setRepeatHeader
public void setRepeatHeader(boolean repeat)
This attribute controls whether to repeat a table's header row at the top of a table split across pages.- Parameters:
repeat- - if TRUE, repeat header row at the top of each page of table; if FALSE, don't repeat header row.
-
isRepeatHeader
public boolean isRepeatHeader()
Return true if a table's header row should be repeated at the top of a table split across pages.- Returns:
- true if table's header row should be repeated at the top of each page of table, false otherwise.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG