JComponentPack 1.5.0

com.zfqjava.swing
Class DefaultCellSpanModel

java.lang.Object
  extended by com.zfqjava.swing.AbstractCellSpanModel
      extended by com.zfqjava.swing.DefaultCellSpanModel
All Implemented Interfaces:
CellSpanModel

public class DefaultCellSpanModel
extends AbstractCellSpanModel


Field Summary
 
Fields inherited from class com.zfqjava.swing.AbstractCellSpanModel
listenerList
 
Constructor Summary
DefaultCellSpanModel()
           
 
Method Summary
 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.
 boolean split(Cell c)
          Splits the cell.
 
Methods inherited from class com.zfqjava.swing.AbstractCellSpanModel
addCellSpanListener, fireCellMerged, fireCellSplitted, getCellSpanListeners, getListeners, removeCellSpanListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCellSpanModel

public DefaultCellSpanModel()
Method Detail

hasCellSpans

public boolean hasCellSpans(int rowIndex,
                            int columnIndex)
Description copied from interface: CellSpanModel
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:
CellSpanModel.getCellSpans(int,int)

getCellSpans

public Cell getCellSpans(int rowIndex,
                         int columnIndex)
Description copied from interface: CellSpanModel
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:
CellSpanModel.hasCellSpans(int,int)

hasCellSpans

public boolean hasCellSpans(int firstRow,
                            int lastRow,
                            int firstColumn,
                            int lastColumn)
Description copied from interface: CellSpanModel
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:
CellSpanModel.getCellSpans(int,int,int,int)

getCellSpans

public Cell[] getCellSpans(int firstRow,
                           int lastRow,
                           int firstColumn,
                           int lastColumn)
Description copied from interface: CellSpanModel
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:
CellSpanModel.hasCellSpans(int,int,int,int)

isSpannedCell

public boolean isSpannedCell(Cell c)
Description copied from interface: CellSpanModel
Determines whether the cell is spanned cell.

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

getSpannedCells

public Cell[] getSpannedCells()
Description copied from interface: CellSpanModel
Returns all spanned cells.

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

merge

public boolean merge(Cell c)
Description copied from interface: CellSpanModel
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:
CellSpanModel.split(com.zfqjava.swing.cell.Cell)

split

public boolean split(Cell c)
Description copied from interface: CellSpanModel
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:
CellSpanModel.merge(com.zfqjava.swing.cell.Cell)

JComponentPack 1.5.0

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