Package org.vaadin.miki.events.state
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
ConstructorsConstructorDescriptionStateChangeEvent(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
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
StateChangeEvent
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-trueif the event originated from the clientstate- Current state of the component.
-
-
Method Details
-
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.
-