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 interface
StateChangeEvent.StateChangeHandler
Event 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>
TYPE
Type 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, 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 void
dispatch(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.FastStringSet
getChangedPropertiesFastSet()
Deprecated.As of 7.0.1, usehasPropertyChanged(String)
instead for improved performance.boolean
hasPropertyChanged(String property)
Checks whether the give property has changed.boolean
isInitialStateChange()
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, 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
-true
if 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:
getAssociatedType
in classcom.google.gwt.event.shared.GwtEvent<StateChangeEvent.StateChangeHandler>
-
dispatch
public void dispatch(StateChangeEvent.StateChangeHandler listener)
Description copied from class:AbstractServerConnectorEvent
Sends this event to the given handler.- Specified by:
dispatch
in 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:
true
if 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
-
-