JComponentPack 1.3.0

com.zfqjava.swing
Interface CellSpanModel

All Known Subinterfaces:
DataGridModel
All Known Implementing Classes:
AbstractCellSpanModel, AbstractDataGridModel, DataGridModelAdapter, DefaultCellSpanModel, DefaultDataGridModel, LargeDataGridModel, ResultSetDataGridModelAdapter

public interface CellSpanModel

Since:
JComponentPack 1.3 JDataGrid 2.7

Method Summary
 void addCellSpanListener(CellSpanListener l)
          Adds a listener to the list that is notified each time a change to the cell span model occurs.
 Cell getCellSpans(int rowIndex, int columnIndex)
          Returns the cell that spans the specified cell at rowIndex and columnIndex.
 Cell[] getCellSpans(int firstRow, int lastRow, int firstColumn, int lastColumn)
          Returns the cells that spans the specified cell area.
 Cell[] getSpannedCells()
          Returns all spanned cells.
 boolean hasCellSpans(int rowIndex, int columnIndex)
          Returns true if has cell spans the specified cell at rowIndex and columnIndex.
 boolean hasCellSpans(int firstRow, int lastRow, int firstColumn, int lastColumn)
          Returns true if has some cells spans the specified cell area.
 boolean isSpannedCell(Cell c)
          Determines whether the cell is spanned cell.
 boolean merge(Cell c)
          Merges the cell.
 void removeCellSpanListener(CellSpanListener l)
          Removes a listener from the list that is notified each time a change to the cell span model occurs.
 boolean split(Cell c)
          Splits the cell.
 

Method Detail

hasCellSpans

boolean hasCellSpans(int rowIndex,
                     int columnIndex)
Returns true if has cell spans the specified cell at rowIndex and columnIndex.

Parameters:
rowIndex - the row index of the specified cell
columnIndex - the column index of the specified cell
See Also:
getCellSpans(int,int)

getCellSpans

Cell getCellSpans(int rowIndex,
                  int columnIndex)
Returns the cell that spans the specified cell at rowIndex and columnIndex.

Parameters:
rowIndex - the row index of the specified cell
columnIndex - the column index of the specified cell
Returns:
the cell that spans the specified cell
See Also:
hasCellSpans(int,int)

hasCellSpans

boolean hasCellSpans(int firstRow,
                     int lastRow,
                     int firstColumn,
                     int lastColumn)
Returns true if has some cells spans the specified cell area.

Note:Some cell spans the area can have row and column index out of the area index.

Parameters:
firstRow - the first row index of the specified cell area
lastRow - the last row index of the specified cell area
firstColumn - the first column index of the specified cell area
lastColumn - the last column index of the specified cell area
Returns:
true if has some cells spans the specified cell area
See Also:
getCellSpans(int,int,int,int)

getCellSpans

Cell[] getCellSpans(int firstRow,
                    int lastRow,
                    int firstColumn,
                    int lastColumn)
Returns the cells that spans the specified cell area. Returns 0 length array if no such cells.

Note:Some cell spans the area can have row and column index out of the area index.

Parameters:
firstRow - the first row index of the specified cell area
lastRow - the last row index of the specified cell area
firstColumn - the first column index of the specified cell area
lastColumn - the last column index of the specified cell area
Returns:
the cells that spans the specified cell area
See Also:
hasCellSpans(int,int,int,int)

isSpannedCell

boolean isSpannedCell(Cell c)
Determines whether the cell is spanned cell.

Parameters:
c - the cell
Returns:
true if the cell has merged use the merge(com.zfqjava.swing.cell.Cell).

getSpannedCells

Cell[] getSpannedCells()
Returns all spanned cells.

Returns:
all spannned cells that merged use the merge(com.zfqjava.swing.cell.Cell).

merge

boolean merge(Cell c)
Merges the cell. Returns true if this model changes as a result of the call. (Returns false if this model already contains such spanned cell c or does not permit such operation.)

Parameters:
c - the cell
Returns:
true if this model changed as a result of the call
See Also:
split(com.zfqjava.swing.cell.Cell)

split

boolean split(Cell c)
Splits the cell. Returns true if this model changes as a result of the call. (Returns false if this model have not such spanned cell or does not permit such operation.)

Parameters:
c - the cell
Returns:
true if this model changed as a result of the call
See Also:
merge(com.zfqjava.swing.cell.Cell)

addCellSpanListener

void addCellSpanListener(CellSpanListener l)
Adds a listener to the list that is notified each time a change to the cell span model occurs.

Parameters:
l - the CellSpanListener

removeCellSpanListener

void removeCellSpanListener(CellSpanListener l)
Removes a listener from the list that is notified each time a change to the cell span model occurs.

Parameters:
l - the CellSpanListener

JComponentPack 1.3.0

Send your Feedback
JComponentPack 1.3.0
Copyright © 2001-2007 Extreme Component, Inc. All rights reserved.