Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.cells
Class CellArea

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

public class CellArea
extends java.lang.Object

Represents a range of cells in a worksheet.


Constructor Summary
CellArea()
          Default constructor.
CellArea(int startRow, int startColumn, int endRow, int endColumn)
          Constructs an object with the given values.
CellArea(java.lang.String startCellName, java.lang.String endCellName)
          Constructs an object with the given values.
 
Method Summary
 short getEndColumn()
          Gets the column index of the bottom right cell.
 int getEndRow()
          Gets the row index of the bottom right cell.
 short getStartColumn()
          Gets the column index of the top left cell.
 int getStartRow()
          Gets the row index of the top left cell.
 boolean isValid()
          Checks if the object represents a valid range.
 void setEndColumn(int endColumn)
          Sets the column index of the bottom right cell.
 void setEndRow(int endRow)
          Sets the row index of the bottom right cell.
 void setStartColumn(int startColumn)
          Sets the column index of the top left cell.
 void setStartRow(int startRow)
          Sets the row index of the top left cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellArea

public CellArea(int startRow,
                int startColumn,
                int endRow,
                int endColumn)
Constructs an object with the given values.

Parameters:
startRow - row index of the top left cell.
startColumn - column index of the top left cell.
endRow - row index of the bottom right cell.
endColumn - column index of the bottom right cell.

CellArea

public CellArea(java.lang.String startCellName,
                java.lang.String endCellName)
Constructs an object with the given values.

Parameters:
startCellName - start cell name of this cell range.
endCellName - end cell name of this cell range.

CellArea

public CellArea()
Default constructor. All fields are initilized to zero.

Method Detail

setStartRow

public void setStartRow(int startRow)
Sets the row index of the top left cell.

Parameters:
startRow - row index of the top left cell.
Throws:
java.lang.IllegalArgumentException - if row index is out of range.

setStartColumn

public void setStartColumn(int startColumn)
Sets the column index of the top left cell.

Parameters:
startColumn - column index of the top left cell.
Throws:
java.lang.IllegalArgumentException - if column index is out of range.

setEndRow

public void setEndRow(int endRow)
Sets the row index of the bottom right cell.

Parameters:
endRow - row index of the bottom right cell.
Throws:
java.lang.IllegalArgumentException - if row index is out of range.

setEndColumn

public void setEndColumn(int endColumn)
Sets the column index of the bottom right cell.

Parameters:
endColumn - column index of the bottom right cell.
Throws:
java.lang.IllegalArgumentException - if column index is out of range.

getStartRow

public int getStartRow()
Gets the row index of the top left cell.

Returns:
row index of the top left cell.

getStartColumn

public short getStartColumn()
Gets the column index of the top left cell.

Returns:
column index of the top left cell.

getEndRow

public int getEndRow()
Gets the row index of the bottom right cell.

Returns:
row index of the bottom right cell.

getEndColumn

public short getEndColumn()
Gets the column index of the bottom right cell.

Returns:
column index of the bottom right cell.

isValid

public boolean isValid()
Checks if the object represents a valid range.

Returns:
false if any of the start indexes is greater than its respective end index.