com.vaadin.client.communication
Class StateChangeEvent

java.lang.Object
  extended by com.google.web.bindery.event.shared.Event<H>
      extended by com.google.gwt.event.shared.GwtEvent<H>
          extended by com.vaadin.client.communication.AbstractServerConnectorEvent<StateChangeEvent.StateChangeHandler>
              extended by com.vaadin.client.communication.StateChangeEvent

public class StateChangeEvent
extends AbstractServerConnectorEvent<StateChangeEvent.StateChangeHandler>


Nested Class Summary
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>
 
Field Summary
static com.google.gwt.event.shared.GwtEvent.Type<StateChangeEvent.StateChangeHandler> TYPE
          Type of this event, used by the event bus.
 
Constructor Summary
StateChangeEvent(ServerConnector connector, FastStringSet changedProperties)
          Deprecated. As of 7.0.2, use StateChangeEvent(ServerConnector, JSONObject, boolean) instead for improved performance.
StateChangeEvent(ServerConnector connector, JSONObject stateJson, boolean initialStateChange)
          /** Creates a new state change event.
StateChangeEvent(ServerConnector connector, java.util.Set<java.lang.String> changedPropertiesSet)
          Deprecated. As of 7.0.1, use StateChangeEvent(ServerConnector, JSONObject, boolean) instead for improved performance.
 
Method Summary
 void dispatch(StateChangeEvent.StateChangeHandler listener)
          Sends this event to the given handler.
 com.google.gwt.event.shared.GwtEvent.Type<StateChangeEvent.StateChangeHandler> getAssociatedType()
           
 java.util.Set<java.lang.String> getChangedProperties()
          Deprecated. As of 7.0.1, use hasPropertyChanged(String) instead for improved performance.
 FastStringSet getChangedPropertiesFastSet()
          Deprecated. As of 7.0.1, use hasPropertyChanged(String) instead for improved performance.
 boolean hasPropertyChanged(java.lang.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
 
Methods inherited from class com.google.web.bindery.event.shared.Event
setSource, toDebugString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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,
                                   java.util.Set<java.lang.String> changedPropertiesSet)
Deprecated. As of 7.0.1, use StateChangeEvent(ServerConnector, JSONObject, boolean) instead for improved performance.

Creates a new state change event.

Parameters:
connector - the event whose state has changed
changedPropertiesSet - a set of names of the changed properties

StateChangeEvent

@Deprecated
public StateChangeEvent(ServerConnector connector,
                                   FastStringSet changedProperties)
Deprecated. As of 7.0.2, use StateChangeEvent(ServerConnector, JSONObject, boolean) instead for improved performance.

Creates a new state change event.

Parameters:
connector - the event whose state has changed
changedProperties - 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 changed
stateJson - the JSON representation of the state change
initialStateChange - true if the state change is for a new connector, otherwise false
Method Detail

getAssociatedType

public com.google.gwt.event.shared.GwtEvent.Type<StateChangeEvent.StateChangeHandler> getAssociatedType()
Overrides:
getAssociatedType in class com.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 class AbstractServerConnectorEvent<StateChangeEvent.StateChangeHandler>
Parameters:
listener - The handler to dispatch.

getChangedProperties

@Deprecated
public java.util.Set<java.lang.String> getChangedProperties()
Deprecated. As of 7.0.1, use hasPropertyChanged(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, use hasPropertyChanged(String) instead for improved performance.

Gets the properties that have changed.

Returns:
a set of names of the changed properties

hasPropertyChanged

public boolean hasPropertyChanged(java.lang.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, else false>

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


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.