Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.cells
Class Row

java.lang.Object
  extended by com.aspose.cells.Row

public class Row
extends java.lang.Object

Represents a row of a spreadsheet.


Method Summary
 void applyStyle(Style style, StyleFlag flag)
          Applies formattings for a whole row.
 Cell getCell(int columnIndex)
          Gets the cell at the specified column index.
 java.util.Iterator getCellIterator()
          Returns an iterator which can iterate all defined cells in this row.
 short getFirstCellIndex()
          Gets the index of the first defined row.
 float getHeight()
          Gets the height of the row in points.
 short getLastCellIndex()
          Gets the index of the last defined row.
 int getRowIndex()
          Gets the row index.
 Style getStyle()
          Gets the style of the row.
 boolean isHidden()
          Checks if the row is hidden.
 boolean isUsingDefaultHeight()
          Indicates whether row has default row heigt.
 void removeCell(int columnIndex)
          Removes the cell at the specified column index.
 void setDefaultHeight()
          Invalidate the row height setting.
 void setHeight(float height)
          Sets the row height, in points.
 void setHidden(boolean isHidden)
          Sets whether the row to be hidden or not.
 void setStyle(int startColumn, int endColumn, Style style)
          Sets style for a continuous range of cells of the row.
 void setStyle(Style style)
          Sets the style of the row.
 void setUseDefaultHeight(boolean isUsingDefaultHeight)
          Sets whether row has default row heigt .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRowIndex

public int getRowIndex()
Gets the row index.

Throws:
CellsException - if the row has been removed from the worksheet.

getCell

public Cell getCell(int columnIndex)
Gets the cell at the specified column index.

Parameters:
columnIndex - the column index.
Returns:
the cell
Throws:
CellsException - if the row has been removed from the worksheet.

removeCell

public void removeCell(int columnIndex)
Removes the cell at the specified column index.

Parameters:
columnIndex - the column index
Throws:
CellsException - if the row has been removed from the worksheet.

getStyle

public Style getStyle()
Gets the style of the row.

Throws:
CellsException - if the row has been removed from the worksheet.

setStyle

public void setStyle(Style style)
Sets the style of the row.

Parameters:
style - style of the row.

applyStyle

public void applyStyle(Style style,
                       StyleFlag flag)
Applies formattings for a whole row.

Parameters:
style - The style object which will be applied.
flag - Flags which indicates applied formatting properties.

getHeight

public float getHeight()
Gets the height of the row in points.

Returns:
row height, in points.

setHeight

public void setHeight(float height)
Sets the row height, in points.

Parameters:
height - height of the row, in points(0-409).
Throws:
java.lang.IllegalArgumentException - if the row height is invalid.

setDefaultHeight

public void setDefaultHeight()
Invalidate the row height setting. Obliges this row to use the default row height of the worksheet that the row belongs to.


isHidden

public boolean isHidden()
Checks if the row is hidden.

Returns:
true if the row is hidden.

setHidden

public void setHidden(boolean isHidden)
Sets whether the row to be hidden or not.

Parameters:
isHidden - true for hidden.

getFirstCellIndex

public short getFirstCellIndex()
Gets the index of the first defined row.

Returns:
index of the first defined row. Returns -1 if no row is defined.

getLastCellIndex

public short getLastCellIndex()
Gets the index of the last defined row.

Returns:
index of the last defined row. Returns -1 if no row is defined.

getCellIterator

public java.util.Iterator getCellIterator()
Returns an iterator which can iterate all defined cells in this row. It is guaranteed the next() method accesses all cells order by cell index.

Returns:
an object that implements the Iterator interface.
Throws:
CellsException - if the row has been removed from the worksheet.

setStyle

public void setStyle(int startColumn,
                     int endColumn,
                     Style style)
Sets style for a continuous range of cells of the row.

Parameters:
startColumn - start column index.
endColumn - end column index.
style - the style to set.
Throws:
java.lang.IllegalArgumentException - if any of the column indexes is out of range.
CellsException - if the row has been removed from the worksheet.

isUsingDefaultHeight

public boolean isUsingDefaultHeight()
Indicates whether row has default row heigt.

Returns:
whether row has default row heigt.

setUseDefaultHeight

public void setUseDefaultHeight(boolean isUsingDefaultHeight)
Sets whether row has default row heigt .

Parameters:
isUsingDefaultHeight - whether row has default row heigt.