|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zfqjava.swing.cell.Cell
public final class 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 rowIndex,
int columnIndex,
boolean rowAbsolute,
boolean columnAbsolute)
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. |
|
Cell(int firstRow,
int lastRow,
int firstColumn,
int lastColumn,
boolean firstRowAbsolute,
boolean lastRowAbsolute,
boolean firstColumnAbsolute,
boolean lastColumnAbsolute)
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(Object obj)
|
static String |
getColumnName(int column)
Returns the column name for the specified column. |
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()
|
Cell |
intersection(Cell c)
Returns the intersection of this cell and the specified cell (return null if the two cell have not intersection). |
Cell |
intersection(int firstRow,
int lastRow,
int firstColumn,
int lastColumn)
Returns the intersection of this cell and the specified cell (return null if the two cell have not intersection). |
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 |
isFirstColumnAbsolute()
Determines whether the cell first column is absolute. |
boolean |
isFirstRowAbsolute()
Determines whether the cell first row is absolute. |
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 |
isLastColumnAbsolute()
Determines whether the cell last column is absolute. |
boolean |
isLastRowAbsolute()
Determines whether the cell last row is absolute. |
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. |
String |
toString()
|
static String |
toString(int rowIndex,
int columnIndex)
Returns the cell name. |
static String |
toString(int rowIndex,
int columnIndex,
boolean rowAbsolute,
boolean columnAbsolute)
Returns the cell name. |
static String |
toString(int firstRow,
int lastRow,
int firstColumn,
int lastColumn)
Returns the cell name. |
static String |
toString(int firstRow,
int lastRow,
int firstColumn,
int lastColumn,
boolean firstRowAbsolute,
boolean lastRowAbsolute,
boolean firstColumnAbsolute,
boolean lastColumnAbsolute)
Returns the cell name. |
Cell |
union(Cell c)
Returns the union of this cell and the specified cell. |
static Cell |
valueOf(String s)
Returns a cell object. |
| 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 rowIndex,
int columnIndex,
boolean rowAbsolute,
boolean columnAbsolute)
rowIndex and columnIndex.
rowIndex - the row index of specified cellcolumnIndex - the column index of specified cellrowAbsolute - the row absolute flagcolumnAbsolute - the column absolute flag
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
public Cell(int firstRow,
int lastRow,
int firstColumn,
int lastColumn,
boolean firstRowAbsolute,
boolean lastRowAbsolute,
boolean firstColumnAbsolute,
boolean lastColumnAbsolute)
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 areafirstRowAbsolute - the first row absolute flaglastRowAbsolute - the last row absolute flagfirstColumnAbsolute - the first column absolute flaglastColumnAbsolute - the last column absolute flag| 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 index
public 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 area
public Cell union(Cell c)
c - the cell
public Cell intersection(Cell c)
public Cell intersection(int firstRow,
int lastRow,
int firstColumn,
int lastColumn)
public boolean isFirstRowAbsolute()
public boolean isFirstColumnAbsolute()
public boolean isLastRowAbsolute()
public boolean isLastColumnAbsolute()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
public static Cell valueOf(String s)
throws ParseException
s - the string
ParseException
public static String toString(int rowIndex,
int columnIndex)
rowIndex - the row index of specified cellcolumnIndex - the column index of specified cell
public static String toString(int rowIndex,
int columnIndex,
boolean rowAbsolute,
boolean columnAbsolute)
rowIndex - the row index of specified cellcolumnIndex - the column index of specified cellrowAbsolute - the row absolute flagcolumnAbsolute - the column absolute flag
public static String toString(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
public static String toString(int firstRow,
int lastRow,
int firstColumn,
int lastColumn,
boolean firstRowAbsolute,
boolean lastRowAbsolute,
boolean firstColumnAbsolute,
boolean lastColumnAbsolute)
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 areafirstRowAbsolute - the first row absolute flaglastRowAbsolute - the last row absolute flagfirstColumnAbsolute - the first column absolute flaglastColumnAbsolute - the last column absolute flag
public static String getColumnName(int column)
column - the column index
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||