![JAR search and dependency download from the Maven repository](/logo.png)
com.sencha.gxt.data.shared.event.StoreClearEvent Maven / Gradle / Ivy
/**
* Ext GWT 3.0.0-beta2 - Ext for GWT
* Copyright(c) 2007-2011, Sencha, Inc.
* [email protected]
*
* http://sencha.com/license
*/
package com.sencha.gxt.data.shared.event;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
import com.sencha.gxt.data.shared.event.StoreClearEvent.StoreClearHandler;
/**
* Indicates that the data in the Store has been cleared, and that corresponding
* views should be cleared as well.
*
*
* @param the model type
*/
public final class StoreClearEvent extends StoreEvent> {
/**
* A class that implements this interface is a public source of
* {@link StoreClearEvent}.
*
* @param the type of data contained in the store
*/
public interface HasStoreClearHandler extends HasHandlers {
/**
* Adds a {@link StoreClearEvent} handler.
*
* @param handler the handler
* @return the registration for the event
*/
HandlerRegistration addStoreClearHandler(StoreClearHandler handler);
}
/**
* Handler interface for {@link StoreClearEvent}.
*
* @param the type of data contained in the store
*/
public interface StoreClearHandler extends EventHandler {
/**
* Called when {@link StoreClearEvent} is fired.
*
* @param event the {@link StoreClearEvent} that was fired
*/
void onClear(StoreClearEvent event);
}
private static GwtEvent.Type> TYPE;
/**
* Gets the type associated with this event.
*
* @return returns the handler type
*/
public static GwtEvent.Type> getType() {
if (TYPE == null) {
TYPE = new GwtEvent.Type>();
}
return TYPE;
}
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
public GwtEvent.Type> getAssociatedType() {
return (GwtEvent.Type) getType();
}
@Override
protected void dispatch(StoreClearHandler handler) {
handler.onClear(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy