T
- The type of the input, which is the same type as the ListView
itself.public static class ListView.EditEvent<T>
extends Event
Event
subclass used specifically in ListView for representing
edit-related events. It provides additional API to easily access the
index that the edit event took place on, as well as the input provided
by the end user.Modifier and Type | Field and Description |
---|---|
static <any> |
ANY
Common supertype for all edit event types.
|
private int |
editIndex |
private T |
newValue |
private static long |
serialVersionUID |
private ListView<T> |
source |
Constructor and Description |
---|
EditEvent(ListView<T> source,
<any> eventType,
T newValue,
int editIndex)
Creates a new EditEvent instance to represent an edit event.
|
Modifier and Type | Method and Description |
---|---|
int |
getIndex()
Returns the index in which the edit took place.
|
T |
getNewValue()
Returns the value of the new input provided by the end user.
|
ListView<T> |
getSource()
Returns the ListView upon which the edit took place.
|
java.lang.String |
toString()
Returns a string representation of this
EditEvent object. |
private final T newValue
private final int editIndex
private static final long serialVersionUID
public static final <any> ANY
public EditEvent(ListView<T> source, <any> eventType, T newValue, int editIndex)
ListView.editStartEvent()
,
ListView.editCommitEvent()
and ListView.editCancelEvent()
types.source
- the sourceeventType
- the event typenewValue
- the new valueeditIndex
- the edit indexpublic int getIndex()
public T getNewValue()
public java.lang.String toString()
EditEvent
object.EditEvent
object.