com.vaadin.flow.component.accordion.
Class Accordion.OpenedChangeEvent
All Implemented Interfaces:
Enclosing class:
An event fired when an Accordion is opened or closed.
See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorsConstructorDescriptionOpenedChangeEvent
(Accordion source, boolean fromClient, Integer index) Creates a new event using the given source and indicator whether the event originated from the client side or the server side.
-
Method Summary
Modifier and TypeMethodDescriptionGets the index of the opened panel or null if the accordion is closed.
Gets the opened panel.
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
OpenedChangeEvent
public OpenedChangeEvent(Accordion source, boolean fromClient, @EventData("event.detail.value") Integer index) Creates a new event using the given source and indicator whether the event originated from the client side or the server side.
Parameters:
source
- the source componentfromClient
-true
if the event originated from the clientindex
- the index of the opened panel or null if the accordion is closed
-
-
Method Details
-
getOpenedIndex
Gets the index of the opened panel or null if the accordion is closed.
Returns:
the index of the opened panel or null if closed
-
getOpenedPanel
Gets the opened panel. Caution should be exercised when using this method with an Accordion which along with its panels were created in a template. Such template children would by default not be children of the Accordion Flow component, thus making it possible for this method to return the wrong panel in such cases.
Returns:
the opened panel.
-