2016-04-21 21:42:53 +02:00
|
|
|
package org.gcube.portlets.user.dataminermanager.client.events;
|
|
|
|
|
2018-05-03 16:24:26 +02:00
|
|
|
import org.gcube.data.analysis.dataminermanagercl.shared.process.Operator;
|
2016-04-21 21:42:53 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Start Computation Execution Request Event
|
|
|
|
*
|
|
|
|
*
|
2017-05-12 11:58:15 +02:00
|
|
|
* @author Giancarlo Panichi
|
|
|
|
*
|
2016-04-21 21:42:53 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class StartComputationExecutionRequestEvent
|
|
|
|
extends
|
|
|
|
GwtEvent<StartComputationExecutionRequestEvent.StartComputationExecutionRequestEventHandler> {
|
|
|
|
|
|
|
|
public static Type<StartComputationExecutionRequestEventHandler> TYPE = new Type<StartComputationExecutionRequestEventHandler>();
|
|
|
|
private Operator op;
|
|
|
|
private int computationStatusPanelIndex;
|
|
|
|
|
2016-05-02 19:58:14 +02:00
|
|
|
public interface StartComputationExecutionRequestEventHandler extends
|
|
|
|
EventHandler {
|
2016-04-21 21:42:53 +02:00
|
|
|
void onStart(StartComputationExecutionRequestEvent event);
|
|
|
|
}
|
|
|
|
|
2016-05-02 19:58:14 +02:00
|
|
|
public interface HasStartComputationExecutionRequestEventHandler extends
|
|
|
|
HasHandlers {
|
2016-04-21 21:42:53 +02:00
|
|
|
public HandlerRegistration addStartComputationExecutionRequestEventHandler(
|
|
|
|
StartComputationExecutionRequestEventHandler handler);
|
|
|
|
}
|
|
|
|
|
2016-05-02 19:58:14 +02:00
|
|
|
public StartComputationExecutionRequestEvent(Operator op,
|
|
|
|
int computationStatusPanelIndex) {
|
2016-04-21 21:42:53 +02:00
|
|
|
this.op = op;
|
|
|
|
this.computationStatusPanelIndex = computationStatusPanelIndex;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void dispatch(StartComputationExecutionRequestEventHandler handler) {
|
|
|
|
handler.onStart(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Type<StartComputationExecutionRequestEventHandler> getAssociatedType() {
|
|
|
|
return TYPE;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static Type<StartComputationExecutionRequestEventHandler> getType() {
|
|
|
|
return TYPE;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void fire(HasHandlers source,
|
|
|
|
StartComputationExecutionRequestEvent event) {
|
|
|
|
source.fireEvent(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
public Operator getOp() {
|
|
|
|
return op;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getComputationStatusPanelIndex() {
|
|
|
|
return computationStatusPanelIndex;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "StartComputationExecutionRequestEvent [op=" + op
|
|
|
|
+ ", computationStatusPanelIndex="
|
|
|
|
+ computationStatusPanelIndex + "]";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|