Methods Summary |
---|
public int | compareTo(org.apache.poi.hssf.util.Region r)Compares that the given region is the same less than or greater than this
region. If any regional coordiant passed in is less than this regions
coordinants then a positive integer is returned. Otherwise a negative
integer is returned.
if ((this.getRowFrom() == r.getRowFrom())
&& (this.getColumnFrom() == r.getColumnFrom())
&& (this.getRowTo() == r.getRowTo())
&& (this.getColumnTo() == r.getColumnTo()))
{
return 0;
}
if ((this.getRowFrom() < r.getRowFrom())
|| (this.getColumnFrom() < r.getColumnFrom())
|| (this.getRowTo() < r.getRowTo())
|| (this.getColumnTo() < r.getColumnTo()))
{
return 1;
}
return -1;
|
public int | compareTo(java.lang.Object o)
return compareTo(( Region ) o);
|
public boolean | contains(int row, short col)Answers: "is the row/column inside this range?"
if ((this.rowFrom <= row) && (this.rowTo >= row)
&& (this.colFrom <= col) && (this.colTo >= col))
{
// System.out.println("Region ("+rowFrom+","+colFrom+","+rowTo+","+
// colTo+") does contain "+row+","+col);
return true;
}
return false;
|
public boolean | equals(org.apache.poi.hssf.util.Region r)
return (compareTo(r) == 0);
|
public int | getArea()
return ((1 + (getRowTo() - getRowFrom()))
* (1 + (getColumnTo() - getColumnFrom())));
|
public short | getColumnFrom()get the upper left hand corner column number
return colFrom;
|
public short | getColumnTo()get the lower right hand corner column number
return colTo;
|
public int | getRowFrom()get the upper left hand corner row number
return rowFrom;
|
public int | getRowTo()get the lower right hand corner row number
return rowTo;
|
public void | setColumnFrom(short colFrom)set the upper left hand corner column number
this.colFrom = colFrom;
|
public void | setColumnTo(short colTo)set the lower right hand corner column number
this.colTo = colTo;
|
public void | setRowFrom(int rowFrom)set the upper left hand corner row number
this.rowFrom = rowFrom;
|
public void | setRowTo(int rowTo)get the lower right hand corner row number
this.rowTo = rowTo;
|