Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widget-common-event@90999 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-02-06 17:50:53 +00:00
parent 05ace92657
commit 4e30a0f84c
2 changed files with 80 additions and 0 deletions

View File

@ -0,0 +1,66 @@
package org.gcube.portlets.user.td.widgetcommonevent.client.event;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
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 ChangeTableRequestEvent extends GwtEvent<ChangeTableRequestEvent.ChangeTableRequestEventHandler> {
public static Type<ChangeTableRequestEventHandler> TYPE = new Type<ChangeTableRequestEventHandler>();
private ChangeTableRequestType changeTableRequestType;
private TRId trId;
public interface ChangeTableRequestEventHandler extends EventHandler {
void onChangeTableRequestEvent(ChangeTableRequestEvent event);
}
public interface HasChangeTableRequestEventHandler extends HasHandlers{
public HandlerRegistration addChangeTableRequestEventHandler(ChangeTableRequestEventHandler handler);
}
public static void fire(HasHandlers source, ChangeTableRequestType operationCompleteType, TRId trId) {
source.fireEvent(new ChangeTableRequestEvent(operationCompleteType,trId));
}
public ChangeTableRequestEvent(ChangeTableRequestType changeTableRequestType, TRId trId) {
this.changeTableRequestType = changeTableRequestType;
this.trId = trId;
}
public static Type<ChangeTableRequestEventHandler> getType() {
return TYPE;
}
@Override
protected void dispatch(ChangeTableRequestEventHandler handler) {
handler.onChangeTableRequestEvent(this);
}
@Override
public Type<ChangeTableRequestEventHandler> getAssociatedType() {
return TYPE;
}
public ChangeTableRequestType getOperationCompleteType() {
return changeTableRequestType;
}
public TRId getTrId() {
return trId;
}
public void setTrId(TRId trId) {
this.trId = trId;
}
}

View File

@ -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 ChangeTableRequestType {
CHANGECOLUMNTYPE
}