Class ListView.EditEvent<T>
java.lang.Object
java.util.EventObject
javafx.event.Event
javafx.scene.control.ListView.EditEvent<T>
- Type Parameters:
T- The type of the input, which is the same type as the ListView itself.
- All Implemented Interfaces:
Serializable, Cloneable
An
Event subclass used specifically in ListView for representing
edit-related events. It provides additional API to easily access the
index 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
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
Constructors -
Method Summary
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.
-
Field Details
-
ANY
-
-
Constructor Details
-
EditEvent
public EditEvent(ListView<T> source, EventType<? extends ListView.EditEvent<T>> eventType, T newValue, int editIndex) Creates a new EditEvent instance to represent an edit event. This event is used forListView.editStartEvent(),ListView.editCommitEvent()andListView.editCancelEvent()types.- Parameters:
source- the sourceeventType- the event typenewValue- the new valueeditIndex- the edit index
-
-
Method Details
-
getSource
Returns the ListView upon which the edit took place.- Overrides:
getSourcein classEventObject
-
getIndex
public int getIndex()Returns the index in which the edit took place.- Returns:
- the index in which the edit took place
-
getNewValue
Returns the value of the new input provided by the end user.- Returns:
- the value of the new input provided by the end user
-
toString
Returns a string representation of thisEditEventobject.- Overrides:
toStringin classEventObject- Returns:
- a string representation of this
EditEventobject.
-