jet.report.xls
Class Region

java.lang.Object
  extended by jet.report.xls.Region

public class Region
extends java.lang.Object

Represents a from/to row/col square. This is a primitive object that can be used to represent row, col, which is just as one would use String to represent a string of characters.


Constructor Summary
Region()
          Constructs a new instance of Region (0,0 - 0,0).
Region(int rowFrom, short colFrom, int rowTo, short colTo)
          Constructs a new instance of Region (rowFrom,colFrom - rowTo,colTo).
 
Method Summary
 boolean contains(int row, short col)
          Answers: "is the row/column inside this range?"
 int getArea()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Region

public Region()
Constructs a new instance of Region (0,0 - 0,0).


Region

public Region(int rowFrom,
              short colFrom,
              int rowTo,
              short colTo)
Constructs a new instance of Region (rowFrom,colFrom - rowTo,colTo).

Parameters:
rowFrom - the row from which the Region begins(based on 0)
colFrom - the column from which the Region begins(based on 0)
rowTo - the row from which the Region ends(based on 0)
colTo - the column from which the Region ends(based on 0)
Method Detail

contains

public boolean contains(int row,
                        short col)
Answers: "is the row/column inside this range?"

Returns:
boolean true if the cell is in the range.

getArea

public int getArea()
Returns:
the area contained by this region (number of cells)