X
- indexing type for horizontal axisY
- indexing type for vertical axispublic class CellExtent<X extends java.lang.Number,Y extends java.lang.Number>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <X extends java.lang.Number,Y extends java.lang.Number> |
create(Cell<X,Y> start,
Cell<X,Y> end)
Creates a new instance of CellExtent from start and end cells.
|
static <X extends java.lang.Number,Y extends java.lang.Number> |
create(Extent<X> extentX,
Extent<Y> extentY)
Creates a new instance of CellExtent from X and Y extents.
|
static <X extends java.lang.Number,Y extends java.lang.Number> |
create(X startX,
X endX,
Y startY,
Y endY)
Creates a new instance of CellExtent.
|
static <X extends java.lang.Number,Y extends java.lang.Number> |
createUnchecked(Cell<X,Y> start,
Cell<X,Y> end)
Creates a new instance of CellExtent without checking arguments validity.
|
static <X extends java.lang.Number,Y extends java.lang.Number> |
createUnchecked(Extent<X> extentX,
Extent<Y> extentY)
Creates a new instance of CellExtent from X and Y extents without checking arguments validity.
|
static <X extends java.lang.Number,Y extends java.lang.Number> |
createUnchecked(X startX,
X endX,
Y startY,
Y endY)
Creates a new instance of CellExtent without checking arguments validity.
|
boolean |
equals(java.lang.Object obj) |
X |
getEndX()
Returns end cell index on the horizontal axis.
|
Y |
getEndY()
Returns end cell index on the vertical axis.
|
X |
getStartX()
Returns start cell index on the horizontal axis.
|
Y |
getStartY()
Returns start cell index on the vertical axis.
|
int |
hashCode() |
java.lang.String |
toString() |
public static <X extends java.lang.Number,Y extends java.lang.Number> CellExtent<X,Y> create(X startX, X endX, Y startY, Y endY)
startX
,endX
, startY
and
endY
numbers are item indexes in the model,
not the visual position of the item on the screen
which can be altered by move and hide operations.
startX
- first index of the range of column itemsendX
- last index of the range of column itemsstartY
- first index of the range of row itemsendY
- last index of the range of row itemsjava.lang.IllegalArgumentException
- if startX
or endX
or startY
or endY
is null.java.lang.IndexOutOfBoundsException
- startX
or endX
or startY
or endY
is negative.java.lang.IllegalArgumentException
- if startX
is greater then
endX
or startY
is greater then
endY
public static <X extends java.lang.Number,Y extends java.lang.Number> CellExtent<X,Y> createUnchecked(X startX, X endX, Y startY, Y endY)
startX
,endX
, startY
and
endY
numbers are item indexes in the model,
not the visual position of the item on the screen
which can be altered by move and hide operations.
startX
- first index of the range of column itemsendX
- last index of the range of column itemsstartY
- first index of the range of row itemsendY
- last index of the range of row itemspublic static <X extends java.lang.Number,Y extends java.lang.Number> CellExtent<X,Y> create(Cell<X,Y> start, Cell<X,Y> end)
start
- the top left corner of the range of cellsend
- the bottom right corner of the range of cellsjava.lang.IllegalArgumentException
- if start
or end
is null.java.lang.IndexOutOfBoundsException
- indexX or indexY of start
or
end
is negative.java.lang.IllegalArgumentException
- if
indexX of start
is greater then indexX of end
or
indexY of start
is greater then indexY of end
public static <X extends java.lang.Number,Y extends java.lang.Number> CellExtent<X,Y> createUnchecked(Cell<X,Y> start, Cell<X,Y> end)
start
- the top left corner of the range of cellsend
- the bottom right corner of the range of cellspublic static <X extends java.lang.Number,Y extends java.lang.Number> CellExtent<X,Y> create(Extent<X> extentX, Extent<Y> extentY)
origin
- the top left corner of the range of cellsend
- the bottom right corner of the range of cellsjava.lang.IllegalArgumentException
- if start
or end
is null.java.lang.IndexOutOfBoundsException
- indexX or indexY of start
or
end
is negative.java.lang.IllegalArgumentException
- if
indexX of start
is greater then indexX of end
or
indexY of start
is greater then indexY of end
public static <X extends java.lang.Number,Y extends java.lang.Number> CellExtent<X,Y> createUnchecked(Extent<X> extentX, Extent<Y> extentY)
origin
- the top left corner of the range of cellsend
- the bottom right corner of the range of cellspublic X getStartX()
public X getEndX()
public Y getStartY()
public Y getEndY()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2011 netanel.pl. All Rights Reserved.