jxl.biff
public class: RangeImpl [javadoc |
source]
java.lang.Object
jxl.biff.RangeImpl
All Implemented Interfaces:
Range
Implementation class for the Range interface. This merely
holds the raw range information, and when the time comes, it
interrogates the workbook for the object.
This does not keep handles to the objects for performance reasons,
as this could impact garbage collection on larger spreadsheets
| Constructor: |
public RangeImpl(WorkbookMethods w,
int s1,
int c1,
int r1,
int s2,
int c2,
int r2) {
workbook = w;
sheet1 = s1;
sheet2 = s2;
row1 = r1;
row2 = r2;
column1 = c1;
column2 = c2;
}
Parameters:
w - the workbook
es - the external sheet
s1 - the sheet of the top left cell of the range
c1 - the column number of the top left cell of the range
r1 - the row number of the top left cell of the range
s2 - the sheet of the bottom right cell
c2 - the column number of the bottom right cell of the range
r2 - the row number of the bottomr right cell of the range
|
| Method from jxl.biff.RangeImpl Detail: |
public Cell getBottomRight() {
Sheet s = workbook.getReadSheet(sheet2);
if (column2 < s.getColumns() &&
row2 < s.getRows())
{
return s.getCell(column2, row2);
}
else
{
return new EmptyCell(column2, row2);
}
}
Gets the cell at the bottom right of this range |
public int getFirstSheetIndex() {
return sheet1;
}
Gets the index of the first sheet in the range |
public int getLastSheetIndex() {
return sheet2;
}
Gets the index of the last sheet in the range |
public Cell getTopLeft() {
Sheet s = workbook.getReadSheet(sheet1);
if (column1 < s.getColumns() &&
row1 < s.getRows())
{
return s.getCell(column1, row1);
}
else
{
return new EmptyCell(column1, row1);
}
}
Gets the cell at the top left of this range |