|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.netanel.swt.matrix.CellExtent<X,Y>
X
- indexing type for horizontal axisY
- indexing type for vertical axispublic class CellExtent<X extends java.lang.Number,Y extends java.lang.Number>
Rectangular set of cells represented by start and end indexes on both axises. Instances of this class are immutable.
Method Summary | ||
---|---|---|
static
|
create(Cell<X,Y> start,
Cell<X,Y> end)
Creates a new instance of CellExtent from start and end cells. |
|
static
|
create(Extent<X> extentX,
Extent<Y> extentY)
Creates a new instance of CellExtent from X and Y extents. |
|
static
|
create(X startX,
X endX,
Y startY,
Y endY)
Creates a new instance of CellExtent. |
|
static
|
createUnchecked(Cell<X,Y> start,
Cell<X,Y> end)
Creates a new instance of CellExtent without checking arguments validity. |
|
static
|
createUnchecked(Extent<X> extentX,
Extent<Y> extentY)
Creates a new instance of CellExtent from X and Y extents without checking arguments validity. |
|
static
|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
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 items
java.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 items
public 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 cells
java.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 cells
public static <X extends java.lang.Number,Y extends java.lang.Number> CellExtent<X,Y> create(Extent<X> extentX, Extent<Y> extentY)
extentX
- range of items on the X axisextentY
- range of items on the Y axis
java.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)
extentX
- range of items on the X axisextentY
- range of items on the Y axis
public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |