|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.zfqjava.swing.cell.Cell
Cell
provides a cell object.
All row or column index must be >= 0, and all first index must be
<= last index.
Note:All methods with Cell
parameter pass null value will
throws java.lang.NullPointerException
.
Constructor Summary | |
Cell(int rowIndex,
int columnIndex)
Constructs a cell object at the specified rowIndex and columnIndex . |
|
Cell(int firstRow,
int lastRow,
int firstColumn,
int lastColumn)
Constructs a cell object for the specified area. |
Method Summary | |
boolean |
contains(Cell c)
Determines whether this cell contains the c . |
boolean |
contains(int rowIndex,
int columnIndex)
Determines whether this cell contains the cell at the specified rowIndex and columnIndex . |
boolean |
contains(int firstRow,
int lastRow,
int firstColumn,
int lastColumn)
Determines whether this cell contains the cell at the specified area. |
boolean |
containsColumn(int columnIndex)
Determines whether this cell contains the column. |
boolean |
containsRow(int rowIndex)
Determines whether this cell contains the row. |
boolean |
equals(java.lang.Object obj)
|
int |
getFirstColumn()
Returns the first column of this cell. |
int |
getFirstRow()
Returns the first row of this cell. |
int |
getHeight()
Returns the cell height. |
int |
getLastColumn()
Returns the last column of this cell. |
int |
getLastRow()
Returns the last row of this cell. |
int |
getWidth()
Returns the cell width. |
int |
getX()
Returns the cell x location. |
int |
getY()
Returns the cell y location. |
int |
hashCode()
|
boolean |
intersects(Cell c)
Determines whether this cell intersects the cell at the specified area. |
boolean |
intersects(int firstRow,
int lastRow,
int firstColumn,
int lastColumn)
Determines whether this cell intersects the cell at the specified area. |
boolean |
isSingleCell()
Returns true if this is a single cell. |
boolean |
isSingleColumn()
Returns true if this is a single column. |
boolean |
isSingleRow()
Returns true if this is a single row. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Cell(int rowIndex, int columnIndex)
rowIndex
and columnIndex
.rowIndex
- the row index of specified cellcolumnIndex
- the column index of specified cellpublic Cell(int firstRow, int lastRow, int firstColumn, int lastColumn)
firstRow
- the first row index of the specified cell arealastRow
- the last row index of the specified cell areafirstColumn
- the first column index of the specified cell arealastColumn
- the last column index of the specified cell areaMethod Detail |
public int getFirstRow()
public int getFirstColumn()
public int getLastRow()
public int getLastColumn()
public int getX()
public int getY()
public int getWidth()
public int getHeight()
public boolean containsRow(int rowIndex)
rowIndex
- the row indexpublic boolean containsColumn(int columnIndex)
columnIndex
- the column indexpublic boolean contains(int rowIndex, int columnIndex)
rowIndex
and columnIndex
.rowIndex
- the row indexcolumnIndex
- the column indexcontains(int, int)
public boolean contains(int firstRow, int lastRow, int firstColumn, int lastColumn)
firstRow
- the first row index of the specified cell arealastRow
- the last row index of the specified cell areafirstColumn
- the first column index of the specified cell arealastColumn
- the last column index of the specified cell areacontains(int, int)
public boolean contains(Cell c)
c
.c
- the cellcontains(int, int)
public boolean intersects(int firstRow, int lastRow, int firstColumn, int lastColumn)
firstRow
- the first row index of the specified cell arealastRow
- the last row index of the specified cell areafirstColumn
- the first column index of the specified cell arealastColumn
- the last column index of the specified cell areapublic boolean intersects(Cell c)
c
- the cellintersects(int, int, int, int)
public boolean isSingleCell()
public boolean isSingleColumn()
public boolean isSingleRow()
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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |