public class TLcdCollectionEvent<T> extends EventObject
ILcdCollection
.ILcdCollectionListener
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
TLcdCollectionEvent.Type
Enumeration of the types of
TLcdCollectionEvent s |
source
Constructor and Description |
---|
TLcdCollectionEvent(ILcdCollection<T> aCollection,
TLcdCollectionEvent.Type aType,
T aElement,
boolean aIsAdjusting)
Create a new event describing a change in the collection
aCollection . |
Modifier and Type | Method and Description |
---|---|
T |
getElement()
Returns the element which caused the change in the collection:
|
ILcdCollection<T> |
getSource() |
TLcdCollectionEvent.Type |
getType()
Returns the type describing the nature of the change.
|
boolean |
isAdjusting()
Returns
true if more changes will be made to the collection immediately after this
one, false otherwise. |
toString
public TLcdCollectionEvent(ILcdCollection<T> aCollection, TLcdCollectionEvent.Type aType, T aElement, boolean aIsAdjusting)
aCollection
.aCollection
- The collection in which the change occurred.aType
- The type describing the nature of the change.aElement
- The element which caused the change.aIsAdjusting
- true
if more changes will be made to the collection after this
change, false
otherwisegetElement()
public TLcdCollectionEvent.Type getType()
public ILcdCollection<T> getSource()
getSource
in class EventObject
public T getElement()
Returns the element which caused the change in the collection:
ELEMENT_ADDED
: the returned object is the element that was added to the
collection.ELEMENT_REMOVED
: the returned object is the element that was removed
from the collection.public boolean isAdjusting()
Returns true
if more changes will be made to the collection immediately after this
one, false
otherwise.
When for example using ILcdCollection.addAll(java.util.Collection)
events will be fired for every element added to the collection. In this case this property should be true
for all events except the one of the last inserted element.
true
if more changes will be made to the collection immediately after this
one, false
otherwise.