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:
- Serialized Form
-
-
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SgetState()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
-
-
-
-
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 componentfromClient-trueif the event originated from the clientstate- 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.
-
-