Created
June 9, 2012 21:56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.client.events; | |
import com.google.gwt.event.shared.GwtEvent; | |
import com.google.gwt.event.shared.EventHandler; | |
import com.google.gwt.event.shared.HasHandlers; | |
public class SaveEvent extends GwtEvent<SaveEvent.SaveHandler> { | |
public static Type<SaveHandler> TYPE = new Type<SaveHandler>(); | |
public interface SaveHandler extends EventHandler { | |
void onSave(SaveEvent event); | |
} | |
public SaveEvent() { | |
} | |
@Override | |
protected void dispatch(SaveHandler handler) { | |
handler.onSave(this); | |
} | |
@Override | |
public Type<SaveHandler> getAssociatedType() { | |
return TYPE; | |
} | |
public static Type<SaveHandler> getType() { | |
return TYPE; | |
} | |
public static void fire(HasHandlers source) { | |
source.fireEvent(new SaveEvent()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment