Package com.vaadin.flow.component.html
Class NativeDetails.ToggleEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<NativeDetails>
com.vaadin.flow.component.html.NativeDetails.ToggleEvent
- All Implemented Interfaces:
Serializable
- Enclosing class:
- NativeDetails
@DomEvent("toggle")
public static class NativeDetails.ToggleEvent
extends ComponentEvent<NativeDetails>
Represents the DOM event "toggle".
In addition to the usual events supported by HTML elements, the details
element supports the toggle event, which is dispatched to the details
element whenever its state changes between open and closed.
It is sent after the state is changed, although if the state changes
multiple times before the browser can dispatch the event, the events are
coalesced so that only one is sent.
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionToggleEvent
(NativeDetails source, boolean fromClient) ToggleEvent base constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isOpened()
Return whether or not the details was opened or closed in this event.Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
ToggleEvent
ToggleEvent base constructor.Note: This event is always triggered on client side. Resulting in
fromClient
to be alwaystrue
.- Parameters:
source
- the source componentfromClient
-true
if the event originated from the client side,false
otherwise
-
-
Method Details
-
isOpened
public boolean isOpened()Return whether or not the details was opened or closed in this event.Delegating to the source component after the toggle event occurred.
- Returns:
- whether details are expanded or collapsed
-