ca.odell.glazedlists.event
Class ListEvent<E>
EventObject
ca.odell.glazedlists.event.ListEvent<E>
public abstract class ListEvent<E>
extends EventObject
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.
abstract ListEvent<E> | copy() - Create a bitwise copy of this
ListEvent .
|
abstract int | getBlockEndIndex() - Gets the last row of the current block of changes.
|
abstract int | getBlockStartIndex() - Gets the first row of the current block of changes.
|
abstract int | getBlocksRemaining() - this method depends on a particular implementation of
how list events are stored internally, and this implementation has
since changed.
|
abstract int | getIndex() - Gets the current row index.
|
abstract int[] | getReorderMap() - Gets the reorder map of this list.
|
EventList | getSourceList() - Gets the List where this event originally occured.
|
abstract int | getType() - Gets the type of the current change, which should be one of
ListEvent.INSERT, UPDATE, or DELETE.
|
abstract boolean | hasNext() - Without incrementing the implicit iterator, this tests if there is another
change to view.
|
abstract boolean | isReordering() - Tests if this change is a complete reordering of the list.
|
abstract boolean | next() - Increments the change sequence to view the next change.
|
abstract boolean | nextBlock() - Increments the change sequence to view the next change block.
|
abstract void | reset() - Resets this event's position to the previously-marked position.
|
abstract String | toString() - Gets this event as a String.
|
DELETE
public static final int DELETE
different types of changes
INSERT
public static final int INSERT
UPDATE
public static final int UPDATE
sourceList
protected EventList sourceList
the list that has changed
getBlockEndIndex
public abstract int getBlockEndIndex()
Gets the last row of the current block of changes. Inclusive.
getBlockStartIndex
public abstract int getBlockStartIndex()
Gets the first row of the current block of changes. Inclusive.
getBlocksRemaining
public abstract int getBlocksRemaining()
this method depends on a particular implementation of
how list events are stored internally, and this implementation has
since changed.
Gets the number of blocks currently remaining in this atomic change.
getIndex
public abstract int getIndex()
Gets the current row index. If the block type is delete, this
will always return the startIndex of the current list change.
getReorderMap
public abstract int[] getReorderMap()
Gets the reorder map of this list. This will also increment the change
sequence to the next change.
- an array of integers where the the previous index of a value is
stored at the current index of that value.
getSourceList
public EventList getSourceList()
Gets the List where this event originally occured.
getType
public abstract int getType()
Gets the type of the current change, which should be one of
ListEvent.INSERT, UPDATE, or DELETE.
hasNext
public abstract boolean hasNext()
Without incrementing the implicit iterator, this tests if there is another
change to view. The user will still need to call next() to view
such a change.
isReordering
public abstract boolean isReordering()
Tests if this change is a complete reordering of the list.
next
public abstract boolean next()
Increments the change sequence to view the next change. This will
return true if such a change exists and false when there is no
change to view.
nextBlock
public abstract boolean nextBlock()
Increments the change sequence to view the next change block.
reset
public abstract void reset()
Resets this event's position to the previously-marked position. This should
be used for
TransformedList
s that require multiple-passes of the
ListEvent
in order to process it.
toString
public abstract String toString()
Gets this event as a String. This simply iterates through all blocks
and concatenates them.
Glazed Lists, Copyright © 2003-2006 publicobject.com, O'Dell Engineering.
Documentation build by pbuilder at 2007-12-21 23:49