|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
ca.odell.glazedlists.event.ListEvent<E>
public final class ListEvent<E>
A ListEvent models a change to a list.
The lists may change over time, causing this sequence of changes to grow indefinitely. The event is accessed like an iterator, with the user calling next() repeatedly to view the changes in sequence.
It is also possible to view changes in blocks, which may provide some performance benefit. To use this, use the nextBlock() method instead of the next() method.
| Field Summary | |
|---|---|
static int |
DELETE
different types of changes |
static int |
INSERT
|
static int |
UPDATE
|
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
ListEvent(ListEvent<E> original)
Creates a clone of this ListEvent, in order to iterate through the changes multiple times. |
|
| Method Summary | |
|---|---|
int |
getBlockEndIndex()
Gets the last row of the current block of changes. |
int |
getBlocksRemaining()
Gets the number of blocks currently remaining in this atomic change. |
int |
getBlockStartIndex()
Gets the first row of the current block of changes. |
int |
getIndex()
Gets the current row index. |
int[] |
getReorderMap()
Gets the reorder map of this list. |
EventList<E> |
getSourceList()
Gets the List where this event originally occured. |
int |
getType()
Gets the type of the current change, which should be one of ListEvent.INSERT, UPDATE, or DELETE. |
boolean |
hasNext()
Without incrementing the implicit iterator, this tests if there is another change to view. |
boolean |
isReordering()
Tests if this change is a complete reordering of the list. |
boolean |
next()
Increments the change sequence to view the next change. |
boolean |
nextBlock()
Increments the change sequence to view the next change block. |
void |
reset()
Resets this event's position to the previously-marked position. |
String |
toString()
Gets this event as a String. |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DELETE
public static final int UPDATE
public static final int INSERT
| Constructor Detail |
|---|
public ListEvent(ListEvent<E> original)
Because the master change sequence does not know about clones, it is possible that the change information stored in the master list will be cleaned up without notifying the clone. In order to prevent this, you should always use the clone list before using the original list - this way the existance of values in the original list guarantees that such values will be visible to the clone.
| Method Detail |
|---|
public void reset()
TransformedLists that require multiple-passes of the
ListEvent in order to process it.
public boolean next()
public boolean hasNext()
public boolean nextBlock()
public boolean isReordering()
public int[] getReorderMap()
public int getIndex()
public int getBlockStartIndex()
public int getBlockEndIndex()
public int getType()
public int getBlocksRemaining()
public EventList<E> getSourceList()
public String toString()
toString in class EventObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||