|
||||||||||
| 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 SpanModelpublic Iterator getSpanIterator()
SpanModel
getSpanIterator in interface SpanModelpublic void addSpan(CellSpan span)
public void removeSpan(CellSpan span)
public void insertRows(int row,
int rowCount)
ResizableGridrowCount rows at row.
insertRows in interface ResizableGridrow - the row to insert atrowCount - the number of rows to insert
public void removeRows(int row,
int rowCount)
ResizableGridrowCount rows at row.
removeRows in interface ResizableGridrow - the row to remove fromrowCount - the number of rows to remove
public void insertColumns(int column,
int columnCount)
ResizableGridcolumnCount columns at column.
insertColumns in interface ResizableGridcolumn - the column to insert atcolumnCount - the number of columns to insert
public void removeColumns(int column,
int columnCount)
ResizableGridcolumnCount columns at column.
removeColumns in interface ResizableGridcolumn - 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 | |||||||||