public class XWPFTableRow
extends java.lang.Object
XWPFTable
. Rows mostly just have sizings and stylings, the interesting content lives inside the child
XWPFTableCell
s
(XWPFTable 中的一行。行大多只有大小和样式,有趣的内容存在于子 XWPFTableCells 中)
Constructor and Description |
---|
XWPFTableRow(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow row, XWPFTable table) |
Modifier and Type | Method and Description |
---|---|
XWPFTableCell |
addNewTableCell()
adds a new TableCell at the end of this tableRow
(在这个 tableRow 的末尾添加一个新的 TableCell)
|
XWPFTableCell |
createCell()
create a new XWPFTableCell and add it to the tableCell-list of this tableRow
(创建一个新的 XWPFTableCell 并将其添加到此 tableRow 的 tableCell-list)
|
XWPFTableCell |
getCell(int pos) |
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow |
getCtRow() |
int |
getHeight()
This element specifies the height of the current table row within the current table.
(此元素指定当前表中当前表行的高度。)
|
TableRowHeightRule |
getHeightRule()
Returns the meaning of the height specified for this table row.
(返回为此表格行指定的高度的含义。)
|
XWPFTable |
getTable() |
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
(如果不存在属于参数 CTTc 单元的 XWPFTableCell,则返回属于 CTTC 单元的 XWPFTableCell 将返回 null)
|
java.util.List<XWPFTableCell> |
getTableCells()
create and return a list of all XWPFTableCell who belongs to this row
(创建并返回属于该行的所有 XWPFTableCell 的列表)
|
java.util.List<ICell> |
getTableICells()
create and return a list of all XWPFTableCell who belongs to this row
(创建并返回属于该行的所有 XWPFTableCell 的列表)
|
boolean |
isCantSplitRow()
Return true if the "can't split row" value is true.
(如果“不能拆分行”值为真,则返回真。)
|
boolean |
isRepeatHeader()
Return true if a table's header row should be repeated at the top of a table split across pages.
(如果表的标题行应在跨页拆分的表的顶部重复,则返回 true。)
|
void |
removeCell(int pos) |
void |
setCantSplitRow(boolean split)
Controls whether to allow this table row to split across pages.
(控制是否允许此表行跨页拆分。)
|
void |
setHeight(int height)
This element specifies the height of the current table row within the current table.
(此元素指定当前表中当前表行的高度。)
|
void |
setHeightRule(TableRowHeightRule heightRule)
Specifies the height rule for this table row.
(指定此表格行的高度规则。)
|
void |
setRepeatHeader(boolean repeat)
This attribute controls whether to repeat a table's header row at the top of a table split across pages.
(此属性控制是否在跨页拆分的表格顶部重复表格的标题行。)
|
public XWPFTableRow(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow row, XWPFTable table)
@Internal public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow getCtRow()
public XWPFTableCell createCell()
public XWPFTableCell getCell(int pos)
public void removeCell(int pos)
public XWPFTableCell addNewTableCell()
public int getHeight()
public void setHeight(int height)
height
-
(高度 -)
public TableRowHeightRule getHeightRule()
If hRule is omitted, then its value shall be assumed to be auto.
(返回为此表格行指定的高度的含义。如果 hRule 被省略,则其值应假定为 auto。)public void setHeightRule(TableRowHeightRule heightRule)
If the value of hRule is auto, then the table row's height should be automatically determined based on the height of its contents. The h value is ignored. If the value of hRule is atLeast, then the table row's height should be at least the value the h attribute. If the value of hRule is exact, then the table row's height should be exactly the value of the h attribute.
(指定此表格行的高度规则。如果 hRule 的值为 auto,则表格行的高度应根据其内容的高度自动确定。 h 值被忽略。如果 hRule 的值是 atLeast,那么表格行的高度应该至少是 h 属性的值。如果 hRule 的值是准确的,那么表格行的高度应该是 h 属性的值。)heightRule
- the height rule to apply to this row.
(heightRule - 应用于该行的高度规则。)
public XWPFTable getTable()
public java.util.List<ICell> getTableICells()
XWPFTableCell
(XWPFTableCell 列表)
public java.util.List<XWPFTableCell> getTableCells()
XWPFTableCell
(XWPFTableCell 列表)
public XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
public boolean isCantSplitRow()
public void setCantSplitRow(boolean split)
split
- - if true, don't allow row to be split. If false, allow row to be split.
(split - - 如果为 true,则不允许拆分行。如果为 false,则允许拆分行。)
public boolean isRepeatHeader()
public void setRepeatHeader(boolean repeat)
repeat
- - if TRUE, repeat header row at the top of each page of table; if FALSE, don't repeat header row.
(repeat - - 如果为TRUE,则在表格每一页的顶部重复标题行;如果为 FALSE,则不要重复标题行。)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.