Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widget-common-event@99768 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
8728649e83
commit
0bc08aa4a3
|
@ -0,0 +1,63 @@
|
|||
package org.gcube.portlets.user.td.widgetcommonevent.client.event;
|
||||
|
||||
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.BackgroundRequestType;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class BackgroundRequestEvent extends GwtEvent<BackgroundRequestEvent.BackgroundRequestEventHandler> {
|
||||
|
||||
public static Type<BackgroundRequestEventHandler> TYPE = new Type<BackgroundRequestEventHandler>();
|
||||
private BackgroundRequestType backgroundRequestType;
|
||||
|
||||
public interface BackgroundRequestEventHandler extends EventHandler {
|
||||
void onBackgroundRequest(BackgroundRequestEvent event);
|
||||
}
|
||||
|
||||
public interface HasBackgroundRequestEventHandler extends HasHandlers{
|
||||
public HandlerRegistration addBackgroundRequestEventHandler(BackgroundRequestEventHandler handler);
|
||||
}
|
||||
|
||||
public BackgroundRequestEvent(BackgroundRequestType backgroundRequestType) {
|
||||
this.backgroundRequestType = backgroundRequestType;
|
||||
}
|
||||
|
||||
public BackgroundRequestType getBackgroundRequestType() {
|
||||
return backgroundRequestType;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(BackgroundRequestEventHandler handler) {
|
||||
handler.onBackgroundRequest(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type<BackgroundRequestEventHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public static Type<BackgroundRequestEventHandler> getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public static void fire(HasHandlers source, BackgroundRequestType backgroundRequestType) {
|
||||
source.fireEvent(new BackgroundRequestEvent(backgroundRequestType));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BackgroundRequestEvent [backgroundRequestType=" + backgroundRequestType + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.td.widgetcommonevent.client.type;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public enum BackgroundRequestType {
|
||||
BACKGROUND;
|
||||
}
|
|
@ -26,6 +26,7 @@ public enum RibbonType {
|
|||
TEMPLATEDELETE,
|
||||
SHARE,
|
||||
TIMELINE,
|
||||
BACKGROUNDTASKS,
|
||||
HISTORY,
|
||||
UNDO,
|
||||
DISCARDALL,
|
||||
|
|
|
@ -22,5 +22,6 @@ public enum WidgetRequestType {
|
|||
CHANGETABLETYPEPANEL,
|
||||
DUPLICATESROWSPANEL,
|
||||
VALIDATIONSTASKSPANEL,
|
||||
CURATIONBYREPLACEBATCHDIALOG;
|
||||
CURATIONBYREPLACEBATCHDIALOG,
|
||||
MONITORBACKGROUNDPANEL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue