|
||||||||||
| 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 |
isFullColumn(int firstRow,
int lastRow)
Returns true if the specified column is a full column. |
boolean |
isFullColumn(int column,
int firstRow,
int lastRow)
Returns true if the specified column is a full column. |
boolean |
isFullRow(int firstColumn,
int lastColumn)
Returns true if the specified row is a full row. |
boolean |
isFullRow(int row,
int firstColumn,
int lastColumn)
Returns true if the specified row is a full row. |
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 cell
public 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 area| Method 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 index
public 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 boolean isFullRow(int firstColumn,
int lastColumn)
firstColumn - the first column index of the specified cell arealastColumn - the last column index of the specified cell area
public boolean isFullRow(int row,
int firstColumn,
int lastColumn)
row - the row indexfirstColumn - the first column index of the specified cell arealastColumn - the last column index of the specified cell area
public boolean isFullColumn(int firstRow,
int lastRow)
firstRow - the first row index of the specified cell arealastRow - the last row index of the specified cell area
public boolean isFullColumn(int column,
int firstRow,
int lastRow)
column - the column indexfirstRow - the first row index of the specified cell arealastRow - the last row index of the specified cell areapublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic 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 | |||||||||