Class StateChangeEvent<S extends Serializable,​C extends com.vaadin.flow.component.Component & HasState<S>>

  • Type Parameters:
    C - Source component.
    S - Information about the state.
    All Implemented Interfaces:
    Serializable

    public class StateChangeEvent<S extends Serializable,​C extends com.vaadin.flow.component.Component & HasState<S>>
    extends com.vaadin.flow.component.ComponentEvent<C>
    Event associated with the change of component's state. Somewhat similar to value change.
    Since:
    2020-07-08
    Author:
    miki
    See Also:
    Serialized Form
    • Constructor Detail

      • StateChangeEvent

        public StateChangeEvent​(C source,
                                boolean fromClient,
                                S state)
        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 component
        fromClient - true if the event originated from the client
        state - Current state of the component.
    • Method Detail

      • getState

        public S getState()
        Returns current state of the source component. Modifying the returned object may affect the source component, but it is not required nor enforced.
        Returns:
        Component state. May never be null.