public class DataEvent extends Object
DataListener.| Modifier and Type | Method and Description |
|---|---|
static DataEvent |
createAddEvent(DataContainer container)
Creates an event of type
DataEventType.ELEMENT_ADDED for the
specified container. |
static DataEvent |
createInsertEvent(DataContainer container,
int index)
Creates an event of type
DataEventType.ELEMENT_INSERTED for the
specified container. |
static DataEvent |
createRemoveEvent(DataContainer container,
int index,
DataElement removedElement)
Creates an event of type
DataEventType.ELEMENT_REMOVED for the
specified container. |
static DataEvent |
createReplaceEvent(DataContainer container,
int index,
DataElement replacedElement)
Creates an event of type
DataEventType.ELEMENT_REPLACED for the
specified container. |
DataContainer |
getContainer()
Returns the container.
|
DataElement |
getDeletedElement()
Returns the deleted element.
|
int |
getIndex()
Returns the index.
|
DataEventType |
getType()
Returns the event type.
|
public static final DataEvent createAddEvent(DataContainer container)
DataEventType.ELEMENT_ADDED for the
specified container.container - Container where an element has been added.public static final DataEvent createInsertEvent(DataContainer container, int index)
DataEventType.ELEMENT_INSERTED for the
specified container.container - Container where an element has been inserted.index - Index at which an element has been inserted.public static final DataEvent createReplaceEvent(DataContainer container, int index, DataElement replacedElement)
DataEventType.ELEMENT_REPLACED for the
specified container.container - Container where an element has been replaced.index - Index of the replaced element.replacedElement - The previous element at index.public static final DataEvent createRemoveEvent(DataContainer container, int index, DataElement removedElement)
DataEventType.ELEMENT_REMOVED for the
specified container.container - Container where an element has been removed.index - Index of the removed element.removedElement - The previous element at index.public DataContainer getContainer()
public DataEventType getType()
DataEventType.ELEMENT_ADDED,
DataEventType.ELEMENT_INSERTED,
DataEventType.ELEMENT_REMOVED, or
DataEventType.ELEMENT_REPLACED.public int getIndex()
public DataElement getDeletedElement()
Copyright © 2015. All Rights Reserved.