Class TreeView.EditEvent<T>
java.lang.Object
java.util.EventObject
javafx.event.Event
javafx.scene.control.TreeView.EditEvent<T>
- Type Parameters:
T
- The type of the input, which is the same type as the TreeView itself.
- All Implemented Interfaces:
Serializable
,Cloneable
An
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.- Since:
- JavaFX 2.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final EventType
<?> Common supertype for all edit event types.Fields declared in class javafx.event.Event
consumed, eventType, NULL_SOURCE_TARGET, target
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the new value input into the TreeItem by the end user.Returns the old value that existed in the TreeItem prior to the current edit event.Returns the TreeView upon which the edit took place.Returns theTreeItem
upon which the edit took place.Methods declared in class javafx.event.Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
Methods declared in class java.util.EventObject
toString
-
Field Details
-
ANY
-
-
Constructor Details
-
EditEvent
public 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. This event is used forTreeView.editStartEvent()
,TreeView.editCommitEvent()
andTreeView.editCancelEvent()
types.- Parameters:
source
- the sourceeventType
- the eventTypetreeItem
- the treeItemoldValue
- the oldValuenewValue
- the newValue
-
-
Method Details
-
getSource
Returns the TreeView upon which the edit took place.- Overrides:
getSource
in classEventObject
-
getTreeItem
-
getNewValue
Returns the new value input into the TreeItem by the end user.- Returns:
- the new value input into the TreeItem by the end user
-
getOldValue
Returns the old value that existed in the TreeItem prior to the current edit event.- Returns:
- the old value that existed in the TreeItem prior to the current edit event
-