com.sencha.gxt.legacy.client.mvc.BeforeAppEvent Maven / Gradle / Ivy
/**
* Sencha GXT 3.1.1 - Sencha for GWT
* Copyright(c) 2007-2014, Sencha, Inc.
* [email protected]
*
* http://www.sencha.com/products/gxt/license/
*/
package com.sencha.gxt.legacy.client.mvc;
import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.sencha.gxt.legacy.client.mvc.BeforeAppEvent.BeforeAppEventHandler;
/**
* Fired before an app event is dispatched. The event can be canceled by calling
* {@link BeforeAppEvent#setCanceled(boolean)}.
*
*/
public class BeforeAppEvent extends GwtEvent {
private static GwtEvent.Type TYPE;
public static GwtEvent.Type getType() {
if (TYPE == null) {
TYPE = new GwtEvent.Type();
}
return TYPE;
}
private final AppEvent appEvent;
private boolean canceled;
public BeforeAppEvent(AppEvent appEvent) {
this.appEvent = appEvent;
}
public AppEvent getAppEvent() {
return appEvent;
}
@Override
public GwtEvent.Type getAssociatedType() {
return getType();
}
@Override
protected void dispatch(BeforeAppEventHandler handler) {
handler.beforeDispatch(this);
}
public boolean isCanceled() {
return canceled;
}
public void setCanceled(boolean canceled) {
this.canceled = canceled;
}
public interface BeforeAppEventHandler extends EventHandler {
void beforeDispatch(BeforeAppEvent event);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy