|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.jeppers.grid.AbstractSpanModel | +--net.sf.jeppers.grid.DefaultSpanModel
Default implementation of SpanModel
. The implementation uses HashSet
to store the cell spans. Therefore getSpanOver(int, int)
has O(N) performance
where N is the number of spans. isCellSpan(int, int)
has O(1) performance and
is used by JGrid
to avoid using getSpanOver(int, int)
when possible.
Field Summary |
Fields inherited from class net.sf.jeppers.grid.AbstractSpanModel |
listenerList |
Constructor Summary | |
DefaultSpanModel()
|
Method Summary | |
void |
addSpan(CellSpan span)
|
Iterator |
getSpanIterator()
Return set of spans where (rowCount > 1 || columnCount > 1) |
CellSpan |
getSpanOver(int row,
int column)
Return the span over the cell at row, column. |
void |
insertColumns(int column,
int columnCount)
Insert columnCount columns at column . |
void |
insertRows(int row,
int rowCount)
Insert rowCount rows at row . |
boolean |
isCellSpan(int row,
int column)
Return true if the cell is part of a span with (rowCount > 1 || columnCount > 1) |
void |
removeColumns(int column,
int columnCount)
Remove columnCount columns at column . |
void |
removeRows(int row,
int rowCount)
Remove rowCount rows at row . |
void |
removeSpan(CellSpan span)
|
Methods inherited from class net.sf.jeppers.grid.AbstractSpanModel |
addSpanModelListener, fireCellSpanAdded, fireCellSpanRemoved, fireCellSpanUpdated, fireSpanChanged, getListeners, 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 CellSpan getSpanOver(int row, int column)
SpanModel
getSpanOver
in interface SpanModel
public boolean isCellSpan(int row, int column)
SpanModel
isCellSpan
in interface SpanModel
public Iterator getSpanIterator()
SpanModel
getSpanIterator
in interface SpanModel
public void addSpan(CellSpan span)
public void removeSpan(CellSpan span)
public void insertRows(int row, int rowCount)
ResizableGrid
rowCount
rows at row
.
insertRows
in interface ResizableGrid
row
- the row to insert atrowCount
- the number of rows to insertpublic void removeRows(int row, int rowCount)
ResizableGrid
rowCount
rows at row
.
removeRows
in interface ResizableGrid
row
- the row to remove fromrowCount
- the number of rows to removepublic void insertColumns(int column, int columnCount)
ResizableGrid
columnCount
columns at column
.
insertColumns
in interface ResizableGrid
column
- the column to insert atcolumnCount
- the number of columns to insertpublic void removeColumns(int column, int columnCount)
ResizableGrid
columnCount
columns at column
.
removeColumns
in interface ResizableGrid
column
- the column to remove fromcolumnCount
- the number of columns to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |