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 EventType<?> |
ANY
Common supertype for all edit event types.
|
consumed, eventType, NULL_SOURCE_TARGET, target
source
Constructor and Description |
---|
EditEvent(TreeView<T> source,
EventType<? extends TreeView.EditEvent> 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. |
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
toString
public static final EventType<?> ANY
public EditEvent(TreeView<T> source, EventType<? extends TreeView.EditEvent> eventType, TreeItem<T> treeItem, T oldValue, T newValue)
TreeView.EDIT_START_EVENT
,
TreeView.EDIT_COMMIT_EVENT
and TreeView.EDIT_CANCEL_EVENT
types.public TreeView<T> getSource()
getSource
in class EventObject
public T getNewValue()
public T getOldValue()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.