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. |
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 |
setUseOptimalHeight(boolean isUseOptimalHeight)
Set if the row always keeps its optimal height.
|
getComponentByElement, getOwnerDocument, registerComponent, unregisterComponent
public 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 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 Component
TableTableRowElement
public 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-2013 The Apache Software Foundation. All Rights Reserved.