65 lines
1.6 KiB
Java
65 lines
1.6 KiB
Java
package org.gcube.portlets.user.dataminermanager.client.events;
|
|
|
|
import org.gcube.portlets.user.dataminermanager.client.bean.output.Resource;
|
|
|
|
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;
|
|
|
|
/**
|
|
* Output Show Event
|
|
*
|
|
*
|
|
* @author "Giancarlo Panichi" <a
|
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
*
|
|
*/
|
|
public class OutputShowEvent extends
|
|
GwtEvent<OutputShowEvent.OutputShowEventHandler> {
|
|
|
|
public static Type<OutputShowEventHandler> TYPE = new Type<OutputShowEventHandler>();
|
|
private Resource resource;
|
|
|
|
public interface OutputShowEventHandler extends EventHandler {
|
|
void onOutputShow(OutputShowEvent event);
|
|
}
|
|
|
|
public interface HasOutputShowResourceEventHandler extends HasHandlers {
|
|
public HandlerRegistration addOutputShowResourceEventHandler(
|
|
OutputShowEventHandler handler);
|
|
}
|
|
|
|
public OutputShowEvent(Resource resource) {
|
|
this.resource = resource;
|
|
}
|
|
|
|
@Override
|
|
protected void dispatch(OutputShowEventHandler handler) {
|
|
handler.onOutputShow(this);
|
|
}
|
|
|
|
@Override
|
|
public Type<OutputShowEventHandler> getAssociatedType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public static Type<OutputShowEventHandler> getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
public static void fire(HasHandlers source, OutputShowEvent event) {
|
|
source.fireEvent(event);
|
|
}
|
|
|
|
public Resource getResource() {
|
|
return resource;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "OutputShowEvent [resource=" + resource + "]";
|
|
}
|
|
|
|
}
|