jxl.read.biff
Class RangeImpl

java.lang.Object
  |
  +--jxl.read.biff.RangeImpl
All Implemented Interfaces:
Range

class RangeImpl
extends java.lang.Object
implements 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


Field Summary
private  int column1
          The column number of the cell at the top left of the range
private  int column2
          The column index of the cell at the bottom right
private  int row1
          The row number of the cell at the top left of the range
private  int row2
          The row index of the cell at the bottom right
private  int sheet1
          The sheet index containing the column at the top left
private  int sheet2
          The sheet index of the cell at the bottom right
private  WorkbookParser workbook
          A handle to the workbook
 
Constructor Summary
RangeImpl(WorkbookParser w, int s1, int c1, int r1, int s2, int c2, int r2)
          Constructor
 
Method Summary
 Cell getBottomRight()
          Gets the cell at the bottom right of this range
 int getFirstSheetIndex()
          Gets the index of the first sheet in the range
 int getLastSheetIndex()
          Gets the index of the last sheet in the range
 Cell getTopLeft()
          Gets the cell at the top left of this range
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

workbook

private WorkbookParser workbook
A handle to the workbook

sheet1

private int sheet1
The sheet index containing the column at the top left

column1

private int column1
The column number of the cell at the top left of the range

row1

private int row1
The row number of the cell at the top left of the range

sheet2

private int sheet2
The sheet index of the cell at the bottom right

column2

private int column2
The column index of the cell at the bottom right

row2

private int row2
The row index of the cell at the bottom right
Constructor Detail

RangeImpl

public RangeImpl(WorkbookParser w,
                 int s1,
                 int c1,
                 int r1,
                 int s2,
                 int c2,
                 int r2)
Constructor
Method Detail

getTopLeft

public Cell getTopLeft()
Gets the cell at the top left of this range
Specified by:
getTopLeft in interface Range
Returns:
the cell at the top left

getBottomRight

public Cell getBottomRight()
Gets the cell at the bottom right of this range
Specified by:
getBottomRight in interface Range
Returns:
the cell at the bottom right

getFirstSheetIndex

public int getFirstSheetIndex()
Gets the index of the first sheet in the range
Specified by:
getFirstSheetIndex in interface Range
Returns:
the index of the first sheet in the range

getLastSheetIndex

public int getLastSheetIndex()
Gets the index of the last sheet in the range
Specified by:
getLastSheetIndex in interface Range
Returns:
the index of the last sheet in the range