|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hssf.record.cf.CellRange
public final class CellRange
Field Summary | |
---|---|
static int |
ENCLOSES
first range encloses or is equal to the second |
static int |
INSIDE
first range is within the second range |
static int |
NO_INTERSECTION
|
static int |
OVERLAP
|
Constructor Summary | |
---|---|
CellRange(int firstRow,
int lastRow,
int firstColumn,
int lastColumn)
|
Method Summary | |
---|---|
CellRange |
cloneCellRange()
|
boolean |
contains(CellRange range)
Check if the specified range is located inside of this cell range. |
boolean |
contains(int row,
short column)
|
static Region[] |
convertCellRangesToRegions(CellRange[] cellRanges)
Convert a List of CellRange objects to an array of regions |
static CellRange[] |
convertRegionsToCellRanges(Region[] regions)
Convert array of regions to a List of CellRange objects |
CellRange |
createEnclosingCellRange(CellRange range)
Create an enclosing CellRange for the two cell ranges. |
int |
getFirstColumn()
|
int |
getFirstRow()
|
int |
getLastColumn()
|
int |
getLastRow()
|
boolean |
hasExactSharedBorder(CellRange range)
Check if the specified cell range has a shared border with the current range. |
int |
intersect(CellRange another)
Intersect this range with the specified range. |
boolean |
isFullColumnRange()
|
boolean |
isFullRowRange()
|
static CellRange[] |
mergeCellRanges(CellRange[] cellRanges)
Do all possible cell merges between cells of the list so that: if a cell range is completely inside of another cell range, it gets removed from the list if two cells have a shared border, merge them into one bigger cell range |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NO_INTERSECTION
public static final int OVERLAP
public static final int INSIDE
public static final int ENCLOSES
Constructor Detail |
---|
public CellRange(int firstRow, int lastRow, int firstColumn, int lastColumn)
firstRow
- lastRow
- pass -1 for full column rangesfirstColumn
- lastColumn
- pass -1 for full row rangesMethod Detail |
---|
public boolean isFullColumnRange()
public boolean isFullRowRange()
public int getFirstRow()
public int getLastRow()
public int getFirstColumn()
public int getLastColumn()
public int intersect(CellRange another)
another
- - the specified range
public static CellRange[] mergeCellRanges(CellRange[] cellRanges)
cellRangeList
-
public static CellRange[] convertRegionsToCellRanges(Region[] regions)
regions
-
public static Region[] convertCellRangesToRegions(CellRange[] cellRanges)
List
- of CellRange objects
public boolean contains(CellRange range)
range
-
public boolean contains(int row, short column)
public boolean hasExactSharedBorder(CellRange range)
true
if the ranges have a complete shared border (i.e.
the two ranges together make a simple rectangular region.public CellRange createEnclosingCellRange(CellRange range)
public CellRange cloneCellRange()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |