72 lines
1.7 KiB
Java
72 lines
1.7 KiB
Java
package org.gcube.portlets.user.statisticalalgorithmsimporter.client.event;
|
|
|
|
import org.gcube.portlets.user.statisticalalgorithmsimporter.client.maindata.MainCodeDescription;
|
|
|
|
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;
|
|
|
|
/**
|
|
* Main Code Set Event
|
|
*
|
|
*
|
|
* @author "Giancarlo Panichi" <a
|
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
*
|
|
*/
|
|
public class MainCodeSetEvent extends
|
|
GwtEvent<MainCodeSetEvent.MainCodeSetEventHandler> {
|
|
|
|
public static Type<MainCodeSetEventHandler> TYPE = new Type<MainCodeSetEventHandler>();
|
|
private MainCodeDescription mainCodeDescription;
|
|
|
|
public interface MainCodeSetEventHandler extends EventHandler {
|
|
void onMainCodeSet(MainCodeSetEvent event);
|
|
}
|
|
|
|
public interface HasMainCodeSetEventHandler extends HasHandlers {
|
|
public HandlerRegistration addMainCodeSetEventHandler(
|
|
MainCodeSetEventHandler handler);
|
|
}
|
|
|
|
public MainCodeSetEvent(MainCodeDescription mainCodeDescription) {
|
|
this.mainCodeDescription = mainCodeDescription;
|
|
}
|
|
|
|
@Override
|
|
protected void dispatch(MainCodeSetEventHandler handler) {
|
|
handler.onMainCodeSet(this);
|
|
}
|
|
|
|
@Override
|
|
public Type<MainCodeSetEventHandler> getAssociatedType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public static Type<MainCodeSetEventHandler> getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public static void fire(HasHandlers source,
|
|
MainCodeSetEvent importCodeEvent) {
|
|
source.fireEvent(importCodeEvent);
|
|
}
|
|
|
|
public MainCodeDescription getMainCodeDescription() {
|
|
return mainCodeDescription;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "MainCodeSetEvent [mainCodeDescription=" + mainCodeDescription
|
|
+ "]";
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|