|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.poi.hssf.util.Region
Represents a from/to row/col square. This is a object primitive that can be used to represent row,col - row,col just as one would use String to represent a string of characters. Its really only useful for HSSF though.
Constructor Summary | |
Region()
Creates a new instance of Region (0,0 - 0,0) |
|
Region(int rowFrom,
short colFrom,
int rowTo,
short colTo)
|
|
Region(MergeCellsRecord.MergedRegion region)
special constructor (I know this is bad but it is so wrong that its right okay) that makes a region from a mergedcells's region subrecord. |
Method Summary | |
int |
compareTo(java.lang.Object o)
|
int |
compareTo(Region r)
Compares that the given region is the same less than or greater than this region. |
boolean |
contains(int row,
short col)
Answers: "is the row/column inside this range?" |
boolean |
equals(Region r)
|
int |
getArea()
|
short |
getColumnFrom()
get the upper left hand corner column number |
short |
getColumnTo()
get the lower right hand corner column number |
int |
getRowFrom()
get the upper left hand corner row number |
int |
getRowTo()
get the lower right hand corner row number |
void |
setColumnFrom(short colFrom)
set the upper left hand corner column number |
void |
setColumnTo(short colTo)
set the lower right hand corner column number |
void |
setRowFrom(int rowFrom)
set the upper left hand corner row number |
void |
setRowTo(int rowTo)
get the lower right hand corner row number |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Region()
public Region(int rowFrom, short colFrom, int rowTo, short colTo)
public Region(MergeCellsRecord.MergedRegion region)
Method Detail |
public short getColumnFrom()
public int getRowFrom()
public short getColumnTo()
public int getRowTo()
public void setColumnFrom(short colFrom)
colFrom
- column number for the upper left hand cornerpublic void setRowFrom(int rowFrom)
rowFrom
- row number for the upper left hand cornerpublic void setColumnTo(short colTo)
colTo
- column number for the lower right hand cornerpublic void setRowTo(int rowTo)
rowTo
- row number for the lower right hand cornerpublic boolean contains(int row, short col)
public boolean equals(Region r)
public int compareTo(Region r)
r
- regioncompareTo(Object)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int getArea()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |