T
- The type of the input, which is the same type as the TreeView
itself.public static class TreeView.EditEvent<T>
extends Event
Event
subclass used specifically in TreeView for representing
edit-related events. It provides additional API to easily access the
TreeItem 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 T |
newValue |
private T |
oldValue |
private static long |
serialVersionUID |
private TreeView<T> |
source |
private TreeItem<T> |
treeItem |
Constructor and Description |
---|
EditEvent(TreeView<T> source,
<any> eventType,
TreeItem<T> treeItem,
T oldValue,
T newValue)
Creates a new EditEvent instance to represent an edit event.
|
Modifier and Type | Method and Description |
---|---|
T |
getNewValue()
Returns the new value input into the TreeItem by the end user.
|
T |
getOldValue()
Returns the old value that existed in the TreeItem prior to the current
edit event.
|
TreeView<T> |
getSource()
Returns the TreeView upon which the edit took place.
|
TreeItem<T> |
getTreeItem()
Returns the
TreeItem upon which the edit took place. |
private static final long serialVersionUID
public static final <any> ANY
private final T oldValue
private final T newValue
public EditEvent(TreeView<T> source, <any> eventType, TreeItem<T> treeItem, T oldValue, T newValue)
TreeView.editStartEvent()
,
TreeView.editCommitEvent()
and TreeView.editCancelEvent()
types.source
- the sourceeventType
- the eventTypetreeItem
- the treeItemoldValue
- the oldValuenewValue
- the newValuepublic TreeItem<T> getTreeItem()
TreeItem
upon which the edit took place.TreeItem
upon which the edit took placepublic T getNewValue()
public T getOldValue()