- java.lang.Object
-
- java.util.EventObject
-
- javafx.event.Event
-
- javafx.scene.control.TreeTableView.EditEvent<S>
-
- Type Parameters:
S
- The type of the input, which is the same type as the TreeTableView itself.
- All Implemented Interfaces:
Serializable
,Cloneable
- Enclosing class:
- TreeTableView<S>
public static class TreeTableView.EditEvent<S> extends Event
AnEvent
subclass used specifically in TreeTableView 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 8.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EditEvent(TreeTableView<S> source, EventType<? extends TreeTableView.EditEvent> eventType, TreeItem<S> treeItem, S oldValue, S newValue)
Creates a new EditEvent instance to represent an edit event.
-
Method Summary
Modifier and Type Method Description S
getNewValue()
Returns the new value input into the TreeItem by the end user.S
getOldValue()
Returns the old value that existed in the TreeItem prior to the current edit event.TreeTableView<S>
getSource()
Returns the TreeTableView upon which the edit took place.TreeItem<S>
getTreeItem()
Returns theTreeItem
upon which the edit took place.-
Methods inherited from class javafx.event.Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
-
Methods inherited from class java.util.EventObject
toString
-
-
-
-
Field Detail
-
ANY
public static final EventType<?> ANY
Common supertype for all edit event types.
-
-
Constructor Detail
-
EditEvent
public EditEvent(TreeTableView<S> source, EventType<? extends TreeTableView.EditEvent> eventType, TreeItem<S> treeItem, S oldValue, S newValue)
Creates a new EditEvent instance to represent an edit event. This event is used forTreeTableView.editStartEvent()
,TreeTableView.editCommitEvent()
andTreeTableView.editCancelEvent()
types.- Parameters:
source
- the sourceeventType
- the eventTypetreeItem
- the treeItemoldValue
- the oldValuenewValue
- the newValue
-
-
Method Detail
-
getSource
public TreeTableView<S> getSource()
Returns the TreeTableView upon which the edit took place.- Overrides:
getSource
in classEventObject
- Returns:
- the TreeTableView upon which the edit took place
-
getTreeItem
public TreeItem<S> getTreeItem()
Returns theTreeItem
upon which the edit took place.- Returns:
- the
TreeItem
upon which the edit took place
-
getNewValue
public S 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
public S 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
-
-