public class Row extends Component
Row provides methods to get table cells that belong to this table row.
| Modifier and Type | Method and Description |
|---|---|
Cell |
getCellByIndex(int index)
Get a cell with a specific index.
|
int |
getCellCount()
Return the count of real cells in this row.
|
OdfStyle |
getDefaultCellStyle()
Get the default cell style of this row.
|
double |
getHeight()
Return the height of the row (in Millimeter).
|
static Row |
getInstance(TableTableRowElement rowElement)
Get the
Row instance from the TableTableRowElement instance. |
String |
getKeepTogether()
Return the string representation of the flag.
|
Row |
getNextRow()
Return the next row of the current row.
|
TableTableRowElement |
getOdfElement()
Return an instance of
TableTableRowElement which represents this feature. |
Row |
getPreviousRow()
Return the previous row of the current row.
|
int |
getRowIndex()
Return the index of this row in the owner table.
|
Table |
getTable()
Get owner table of the current row.
|
boolean |
isOptimalHeight()
Return if the row always keeps its optimal height.
|
void |
setDefaultCellStyle(OdfStyle style)
Set the default cell style to this row.
|
void |
setHeight(double height,
boolean isMinHeight)
Set the height/minimal height of the row (in Millimeter) according to the second parameter.
|
void |
setKeepTogether(boolean keepTogether)
Set the keep together flag
true sets to keep always together
false sets to keep together auto
|
void |
setUseOptimalHeight(boolean isUseOptimalHeight)
Set if the row always keeps its optimal height.
|
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponentpublic static Row getInstance(TableTableRowElement rowElement)
Row instance from the TableTableRowElement instance.
Each TableTableRowElement instance has a one-to-one relationship to a Row
instance.
rowElement - the row element that need to get the corresponding Row instanceRow instance represent the specified row elementpublic Table getTable()
public String getKeepTogether()
public void setKeepTogether(boolean keepTogether)
keepTogether - public double getHeight()
Return the minimal height, if the row height is not set,
public void setHeight(double height,
boolean isMinHeight)
height - the height/minimal height that will be set to the row (in Millimeter).isMinHeight - if it is true, the row can fit the height to the text, vice versa.public boolean isOptimalHeight()
public void setUseOptimalHeight(boolean isUseOptimalHeight)
isUseOptimalHeight - the flag that indicate row should keep its optimal height or notpublic TableTableRowElement getOdfElement()
TableTableRowElement which represents this feature.getOdfElement in class ComponentTableTableRowElementpublic Cell getCellByIndex(int index)
index - the cell index in this rowpublic int getCellCount()
Please note it might not equal to the column count of the owner table, because some of them are the covered cells.
public Row getPreviousRow()
public Row getNextRow()
public void setDefaultCellStyle(OdfStyle style)
The style should already exist in this document.
style - the cell style of the documentpublic OdfStyle getDefaultCellStyle()
public int getRowIndex()
Copyright © 2010–2018 Apache Software Foundation; Copyright © 2018–2020 The Document Foundation. All rights reserved.