Updated UI event type
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widget-common-event@94945 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
305faf67fb
commit
d894e4a0c9
|
@ -1,6 +1,7 @@
|
|||
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.client.type.ChangeTableWhy;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
|
@ -20,6 +21,7 @@ public class ChangeTableRequestEvent extends GwtEvent<ChangeTableRequestEvent.Ch
|
|||
public static Type<ChangeTableRequestEventHandler> TYPE = new Type<ChangeTableRequestEventHandler>();
|
||||
private ChangeTableRequestType changeTableRequestType;
|
||||
private TRId trId;
|
||||
private ChangeTableWhy why;
|
||||
|
||||
public interface ChangeTableRequestEventHandler extends EventHandler {
|
||||
void onChangeTableRequestEvent(ChangeTableRequestEvent event);
|
||||
|
@ -29,11 +31,11 @@ public class ChangeTableRequestEvent extends GwtEvent<ChangeTableRequestEvent.Ch
|
|||
public HandlerRegistration addChangeTableRequestEventHandler(ChangeTableRequestEventHandler handler);
|
||||
}
|
||||
|
||||
public static void fire(HasHandlers source, ChangeTableRequestType operationCompleteType, TRId trId) {
|
||||
source.fireEvent(new ChangeTableRequestEvent(operationCompleteType,trId));
|
||||
public static void fire(HasHandlers source, ChangeTableRequestType operationCompleteType, TRId trId, String why) {
|
||||
source.fireEvent(new ChangeTableRequestEvent(operationCompleteType,trId, why));
|
||||
}
|
||||
|
||||
public ChangeTableRequestEvent(ChangeTableRequestType changeTableRequestType, TRId trId) {
|
||||
public ChangeTableRequestEvent(ChangeTableRequestType changeTableRequestType, TRId trId, String why) {
|
||||
this.changeTableRequestType = changeTableRequestType;
|
||||
this.trId = trId;
|
||||
}
|
||||
|
@ -64,12 +66,25 @@ public class ChangeTableRequestEvent extends GwtEvent<ChangeTableRequestEvent.Ch
|
|||
this.trId = trId;
|
||||
}
|
||||
|
||||
public ChangeTableWhy getWhy() {
|
||||
return why;
|
||||
}
|
||||
|
||||
public void setWhy(ChangeTableWhy why) {
|
||||
this.why = why;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ChangeTableRequestEvent [changeTableRequestType="
|
||||
+ changeTableRequestType + ", trId=" + trId + "]";
|
||||
+ changeTableRequestType + ", trId=" + trId + ", why=" + why
|
||||
+ "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
package org.gcube.portlets.user.td.widgetcommonevent.client.type;
|
||||
|
||||
public enum ChangeTableWhy {
|
||||
TABLEUPDATED,
|
||||
TABLECURATION;
|
||||
}
|
Loading…
Reference in New Issue