Class TreeTableView.EditEvent<S>
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>
An
Event 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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventType<?> Common supertype for all edit event types.Fields declared in class Event
consumed, eventType, NULL_SOURCE_TARGET, targetModifier and TypeFieldDescriptionprotected booleanWhether this event has been consumed by any filter or handler.Type of the event.static final EventTargetThe constant which represents an unknown event source / target.protected EventTargetEvent target that defines the path through which the event will travel when posted. -
Constructor Summary
ConstructorsConstructorDescriptionEditEvent(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 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 TreeTableView upon which the edit took place.Returns theTreeItemupon which the edit took place.Methods declared in class Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumedModifier and TypeMethodDescriptionclone()Creates and returns a copy of thisEvent.voidconsume()Marks thisEventas consumed.copyFor(Object newSource, EventTarget newTarget) Creates and returns a copy of this event with the specified event source and target.static voidfireEvent(EventTarget eventTarget, Event event) Fires the specified event.Gets the event type of this event.Returns the event target of this event.booleanIndicates whether thisEventhas been consumed by any filter or handler.Methods declared in class EventObject
toString
-
Field Details
-
ANY
Common supertype for all edit event types.
-
-
Constructor Details
-
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 Details
-
getSource
Returns the TreeTableView upon which the edit took place.- Overrides:
getSourcein classEventObject- Returns:
- the TreeTableView upon which the edit took place
-
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
-