Package com.vaadin.client.communication
Class StateChangeEvent
- java.lang.Object
-
- com.google.web.bindery.event.shared.Event<H>
-
- com.google.gwt.event.shared.GwtEvent<H>
-
- com.vaadin.client.communication.AbstractServerConnectorEvent<StateChangeEvent.StateChangeHandler>
-
- com.vaadin.client.communication.StateChangeEvent
-
public class StateChangeEvent extends AbstractServerConnectorEvent<StateChangeEvent.StateChangeHandler>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceStateChangeEvent.StateChangeHandlerEvent handler that gets notified whenever any part of the state has been updated by the server.-
Nested classes/interfaces inherited from class com.google.gwt.event.shared.GwtEvent
com.google.gwt.event.shared.GwtEvent.Type<H extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.gwt.event.shared.GwtEvent.Type<StateChangeEvent.StateChangeHandler>TYPEType of this event, used by the event bus.
-
Constructor Summary
Constructors Constructor Description StateChangeEvent(ServerConnector connector, FastStringSet changedProperties)Deprecated.As of 7.0.2, useStateChangeEvent(ServerConnector, JsonObject, boolean)instead for improved performance.StateChangeEvent(ServerConnector connector, elemental.json.JsonObject stateJson, boolean initialStateChange)/** Creates a new state change event.StateChangeEvent(ServerConnector connector, Set<String> changedPropertiesSet)Deprecated.As of 7.0.1, useStateChangeEvent(ServerConnector, JsonObject, boolean)instead for improved performance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voiddispatch(StateChangeEvent.StateChangeHandler listener)Sends this event to the given handler.com.google.gwt.event.shared.GwtEvent.Type<StateChangeEvent.StateChangeHandler>getAssociatedType()Set<String>getChangedProperties()Deprecated.As of 7.0.1, usehasPropertyChanged(String)instead for improved performance.FastStringSetgetChangedPropertiesFastSet()Deprecated.As of 7.0.1, usehasPropertyChanged(String)instead for improved performance.booleanhasPropertyChanged(String property)Checks whether the give property has changed.booleanisInitialStateChange()Checks if the state change event is the first one for the given connector.-
Methods inherited from class com.vaadin.client.communication.AbstractServerConnectorEvent
getConnector, setConnector
-
Methods inherited from class com.google.gwt.event.shared.GwtEvent
assertLive, getSource, isLive, kill, revive
-
-
-
-
Field Detail
-
TYPE
public static final com.google.gwt.event.shared.GwtEvent.Type<StateChangeEvent.StateChangeHandler> TYPE
Type of this event, used by the event bus.
-
-
Constructor Detail
-
StateChangeEvent
@Deprecated public StateChangeEvent(ServerConnector connector, Set<String> changedPropertiesSet)
Deprecated.As of 7.0.1, useStateChangeEvent(ServerConnector, JsonObject, boolean)instead for improved performance.Creates a new state change event.- Parameters:
connector- the event whose state has changedchangedPropertiesSet- a set of names of the changed properties
-
StateChangeEvent
@Deprecated public StateChangeEvent(ServerConnector connector, FastStringSet changedProperties)
Deprecated.As of 7.0.2, useStateChangeEvent(ServerConnector, JsonObject, boolean)instead for improved performance.Creates a new state change event.- Parameters:
connector- the event whose state has changedchangedProperties- a set of names of the changed properties
-
StateChangeEvent
public StateChangeEvent(ServerConnector connector, elemental.json.JsonObject stateJson, boolean initialStateChange)
/** Creates a new state change event.- Parameters:
connector- the event whose state has changedstateJson- the JSON representation of the state changeinitialStateChange-trueif the state change is for a new connector, otherwisefalse
-
-
Method Detail
-
getAssociatedType
public com.google.gwt.event.shared.GwtEvent.Type<StateChangeEvent.StateChangeHandler> getAssociatedType()
- Specified by:
getAssociatedTypein classcom.google.gwt.event.shared.GwtEvent<StateChangeEvent.StateChangeHandler>
-
dispatch
public void dispatch(StateChangeEvent.StateChangeHandler listener)
Description copied from class:AbstractServerConnectorEventSends this event to the given handler.- Specified by:
dispatchin classAbstractServerConnectorEvent<StateChangeEvent.StateChangeHandler>- Parameters:
listener- The handler to dispatch.
-
getChangedProperties
@Deprecated public Set<String> getChangedProperties()
Deprecated.As of 7.0.1, usehasPropertyChanged(String)instead for improved performance.Gets the properties that have changed.- Returns:
- a set of names of the changed properties
-
getChangedPropertiesFastSet
@Deprecated public FastStringSet getChangedPropertiesFastSet()
Deprecated.As of 7.0.1, usehasPropertyChanged(String)instead for improved performance.Gets the properties that have changed.- Returns:
- a set of names of the changed properties
-
hasPropertyChanged
public boolean hasPropertyChanged(String property)
Checks whether the give property has changed.- Parameters:
property- the name of the property to check- Returns:
trueif the property has changed, elsefalse>
-
isInitialStateChange
public boolean isInitialStateChange()
Checks if the state change event is the first one for the given connector.- Returns:
- true if this is the first state change event for the connector, false otherwise
- Since:
- 7.1
-
-