Class ListSpliceEvent
- java.lang.Object
-
- com.vaadin.client.flow.reactive.ReactiveValueChangeEvent
-
- com.vaadin.client.flow.nodefeature.ListSpliceEvent
-
public class ListSpliceEvent extends ReactiveValueChangeEvent
Event fired when the structure of aNodeListchanges.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description ListSpliceEvent(NodeList source, int index, JsArray<?> remove, JsArray<?> add, boolean clear)Creates a new list splice event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsArray<?>getAdd()Gets an array of added items.intgetIndex()Gets the start index of the changes.JsArray<?>getRemove()Gets an array of removed items.NodeListgetSource()Gets the reactive value from which this event originates.booleanisClear()Gets whether this event is aclearevent.
-
-
-
Constructor Detail
-
ListSpliceEvent
public ListSpliceEvent(NodeList source, int index, JsArray<?> remove, JsArray<?> add, boolean clear)
Creates a new list splice event.- Parameters:
source- the changed listindex- the start index of the changesremove- the removed items, notnulladd- the added items, notnullclear-truewhen this is an event triggered upon removing all the nodes of the given list,falseotherwise
-
-
Method Detail
-
getSource
public NodeList getSource()
Description copied from class:ReactiveValueChangeEventGets the reactive value from which this event originates.- Overrides:
getSourcein classReactiveValueChangeEvent- Returns:
- the event source
-
getIndex
public int getIndex()
Gets the start index of the changes.- Returns:
- the start index of the changes
-
getRemove
public JsArray<?> getRemove()
Gets an array of removed items.- Returns:
- array of removed items, not
null
-
getAdd
public JsArray<?> getAdd()
Gets an array of added items.- Returns:
- array of added items, not
null
-
isClear
public boolean isClear()
Gets whether this event is aclearevent.- Returns:
trueif the event was triggered after a full clear,falseotherwise.
-
-