javafx.scene.control
Class ListView.EditEvent<T>
- 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:
public static class ListView.EditEvent<T> extends Event
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
Fields Modifier and Type Field and Description static EventType<?>ANYCommon supertype for all edit event types.-
Fields inherited from class javafx.event.Event
consumed, eventType, NULL_SOURCE_TARGET, target
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor and Description EditEvent(ListView<T> source, EventType<? extends ListView.EditEvent<T>> eventType, T newValue, int editIndex)Creates a new EditEvent instance to represent an edit event.
-
Method Summary
All MethodsInstance MethodsConcrete Methods Modifier and Type Method and Description intgetIndex()Returns the index in which the edit took place.TgetNewValue()Returns the value of the new input provided by the end user.ListView<T>getSource()Returns the ListView upon which the edit took place.StringtoString()Returns a string representation of thisEditEventobject.-
Methods inherited from class javafx.event.Event
clone, consume, copyFor, fireEvent, getEventType, getTarget, isConsumed
-
-
Field Detail
-
ANY
public static final EventType<?> ANY
Common supertype for all edit event types.Since:
JavaFX 8.0
-
-
Constructor Detail
-
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.EDIT_START_EVENT,ListView.EDIT_COMMIT_EVENTandListView.EDIT_CANCEL_EVENTtypes.
-
-
Method Detail
-
getSource
public ListView<T> 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.
-
getNewValue
public T getNewValue()
Returns the value of the new input provided by the end user.
-
toString
public String toString()
Returns a string representation of thisEditEventobject.Overrides:
toStringin classEventObjectReturns:
a string representation of this
EditEventobject.
-
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.