|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sciapp.table.span.AbstractSpanModel
com.sciapp.table.span.DefaultSpanModel
public class DefaultSpanModel
DefaultSpanModel is the default implementation of the SpanModel interface.
This object can dynamically store spanned cells through the addCellSpan(com.sciapp.table.span.CellSpan)
and
removeCellSpan(int, int)
methods.
If a regular cell span pattern is expected on your data table,
it is better to return the cell span by overriding the getCellSpanAt(int, int)
method.
e.g. for producing an all-column cell span every three rows:
public CellSpan getCellSpanAt(int row, int column) {
if (rowIndex % 3 == 0) {
return cs = new CellSpan(row, 0, 0, CellSpan.ALL_COLUMNS);
}
return super.getCellSpanAt(row, column);
}
Field Summary |
---|
Fields inherited from class com.sciapp.table.span.AbstractSpanModel |
---|
listenerList |
Constructor Summary | |
---|---|
DefaultSpanModel()
Constructs a DefaultSpanModel. |
Method Summary | |
---|---|
void |
addCellSpan(CellSpan cellSpan)
Adds a cell span. |
CellSpan |
getCellSpanAt(int row,
int column)
Returns the cell span for the cell at row and column. |
void |
removeAllCellSpans()
Removes all cell spans from the model. |
void |
removeCellSpan(CellSpan cellSpan)
Removes a cell span. |
void |
removeCellSpan(int row,
int column)
Removes the cell span at (row, column). |
Methods inherited from class com.sciapp.table.span.AbstractSpanModel |
---|
addSpanModelListener, fireSpanCellDeleted, fireSpanCellInserted, fireSpanCellsUpdated, fireSpanChanged, fireSpanDataChanged, removeSpanModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultSpanModel()
Method Detail |
---|
public void addCellSpan(CellSpan cellSpan)
cellSpan
- the cell span to add.public CellSpan getCellSpanAt(int row, int column)
row
- the row whose value is to be looked upcolumn
- the column whose value is to be looked up
public void removeAllCellSpans()
public void removeCellSpan(int row, int column)
row
- the index of the cell's rowcolumn
- the index of the cell's columnpublic void removeCellSpan(CellSpan cellSpan)
cellSpan
- the cell span to remove.
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |