Class TreeTableColumn.CellEditEvent<S,T>
java.lang.Object
java.util.EventObject
javafx.event.Event
javafx.scene.control.TreeTableColumn.CellEditEvent<S,T>
- Type Parameters:
S- the type of the TreeItem instances contained within the TreeTableViewT- the type of the items contained within the TreeTableColumn
- All Implemented Interfaces:
Serializable, Cloneable
- Enclosing class:
TreeTableColumn<S,T>
An event that is fired when a user performs an edit on a table cell.
- Since:
- JavaFX 8.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventType<?> Common supertype for all cell 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.Fields declared in class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionCellEditEvent(TreeTableView<S> table, TreeTablePosition<S, T> pos, EventType<TreeTableColumn.CellEditEvent<S, T>> eventType, T newValue) Creates a new event that can be subsequently fired to the relevant listeners. -
Method Summary
Modifier and TypeMethodDescriptionReturns the new value input by the end user.Attempts to return the old value at the position referred to in the TablePosition returned bygetTreeTablePosition().Convenience method that returns the value for the row (that is, from the TableViewitemslist), for the row contained within theTablePositionreturned ingetTreeTablePosition().Returns the TreeTableColumn upon which this event occurred.Returns the position upon which this event occurred.Returns the TableView upon which this event occurred.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
getSource, toString
-
Field Details
-
ANY
Common supertype for all cell edit event types.
-
-
Constructor Details
-
CellEditEvent
public CellEditEvent(TreeTableView<S> table, TreeTablePosition<S, T> pos, EventType<TreeTableColumn.CellEditEvent<S, T>> eventType, T newValue) Creates a new event that can be subsequently fired to the relevant listeners.- Parameters:
table- The TableView on which this event occurred.pos- The position upon which this event occurred.eventType- The type of event that occurred.newValue- The value input by the end user.
-
-
Method Details
-
getTreeTableView
Returns the TableView upon which this event occurred.- Returns:
- The TableView control upon which this event occurred.
-
getTableColumn
Returns the TreeTableColumn upon which this event occurred.- Returns:
- The TreeTableColumn that the edit occurred in.
-
getTreeTablePosition
Returns the position upon which this event occurred.- Returns:
- The position upon which this event occurred.
-
getNewValue
Returns the new value input by the end user. This is not the value to go back into the TableView.items list - this new value represents just the input for a single cell, so it is likely that it needs to go back into a property within an item in the TableView.items list.- Returns:
- An Object representing the new value input by the user.
-
getOldValue
Attempts to return the old value at the position referred to in the TablePosition returned bygetTreeTablePosition(). This may return null for a number of reasons.- Returns:
- Returns the value stored in the position being edited, or null if it can not be retrieved.
-
getRowValue
Convenience method that returns the value for the row (that is, from the TableViewitemslist), for the row contained within theTablePositionreturned ingetTreeTablePosition().- Returns:
- the row value
-