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

java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<C>
org.vaadin.miki.events.state.StateChangeEvent<S,C>
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:
  • Field Summary

    Fields inherited from class java.util.EventObject

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns current state of the source component.

    Methods inherited from class com.vaadin.flow.component.ComponentEvent

    getSource, isFromClient, unregisterListener

    Methods inherited from class java.util.EventObject

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • 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 Details

    • 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.