Minor update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widgetx@101719 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
097759a53a
commit
9d451ec72d
|
@ -5,9 +5,9 @@ package org.gcube.portlets.user.tdwx.client;
|
||||||
|
|
||||||
import org.gcube.portlets.user.tdwx.client.event.CloseTableEvent;
|
import org.gcube.portlets.user.tdwx.client.event.CloseTableEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.FailureEvent;
|
import org.gcube.portlets.user.tdwx.client.event.FailureEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.FailureEventHandler;
|
import org.gcube.portlets.user.tdwx.client.event.FailureEvent.FailureEventHandler;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.GridReadyEvent;
|
import org.gcube.portlets.user.tdwx.client.event.GridReadyEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.GridReadyEventHandler;
|
import org.gcube.portlets.user.tdwx.client.event.GridReadyEvent.GridReadyEventHandler;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.OpenTableEvent;
|
import org.gcube.portlets.user.tdwx.client.event.OpenTableEvent;
|
||||||
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceXFactory;
|
import org.gcube.portlets.user.tdwx.server.datasource.DataSourceXFactory;
|
||||||
import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
|
import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
package org.gcube.portlets.user.tdwx.client;
|
package org.gcube.portlets.user.tdwx.client;
|
||||||
|
|
||||||
import org.gcube.portlets.user.tdwx.client.event.CloseTableEvent;
|
import org.gcube.portlets.user.tdwx.client.event.CloseTableEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.CloseTableEventHandler;
|
import org.gcube.portlets.user.tdwx.client.event.CloseTableEvent.CloseTableEventHandler;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.ColumnsReorderingEvent;
|
import org.gcube.portlets.user.tdwx.client.event.ColumnsReorderingEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.FailureEvent;
|
import org.gcube.portlets.user.tdwx.client.event.FailureEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.OpenTableEvent;
|
import org.gcube.portlets.user.tdwx.client.event.OpenTableEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.OpenTableEventHandler;
|
import org.gcube.portlets.user.tdwx.client.event.OpenTableEvent.OpenTableEventHandler;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.TableReadyEvent;
|
import org.gcube.portlets.user.tdwx.client.event.TableReadyEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataXService;
|
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataXService;
|
||||||
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataXServiceAsync;
|
import org.gcube.portlets.user.tdwx.client.rpc.TabularDataXServiceAsync;
|
||||||
|
|
|
@ -19,13 +19,13 @@ import org.gcube.portlets.user.tdwx.client.config.Row;
|
||||||
import org.gcube.portlets.user.tdwx.client.config.TableViewConfig;
|
import org.gcube.portlets.user.tdwx.client.config.TableViewConfig;
|
||||||
import org.gcube.portlets.user.tdwx.client.config.TabularDataGridViewConfig;
|
import org.gcube.portlets.user.tdwx.client.config.TabularDataGridViewConfig;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.CloseTableEvent;
|
import org.gcube.portlets.user.tdwx.client.event.CloseTableEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.CloseTableEventHandler;
|
import org.gcube.portlets.user.tdwx.client.event.CloseTableEvent.CloseTableEventHandler;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.ColumnsReorderingEvent;
|
import org.gcube.portlets.user.tdwx.client.event.ColumnsReorderingEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.GridReadyEvent;
|
import org.gcube.portlets.user.tdwx.client.event.GridReadyEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.OpenTableEvent;
|
import org.gcube.portlets.user.tdwx.client.event.OpenTableEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.OpenTableEventHandler;
|
import org.gcube.portlets.user.tdwx.client.event.OpenTableEvent.OpenTableEventHandler;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.TableReadyEvent;
|
import org.gcube.portlets.user.tdwx.client.event.TableReadyEvent;
|
||||||
import org.gcube.portlets.user.tdwx.client.event.TableReadyEventHandler;
|
import org.gcube.portlets.user.tdwx.client.event.TableReadyEvent.TableReadyEventHandler;
|
||||||
import org.gcube.portlets.user.tdwx.client.filter.ExtendedGridFilters;
|
import org.gcube.portlets.user.tdwx.client.filter.ExtendedGridFilters;
|
||||||
import org.gcube.portlets.user.tdwx.client.filter.FiltersGenerator;
|
import org.gcube.portlets.user.tdwx.client.filter.FiltersGenerator;
|
||||||
import org.gcube.portlets.user.tdwx.client.model.grid.DataRowColumnConfig;
|
import org.gcube.portlets.user.tdwx.client.model.grid.DataRowColumnConfig;
|
||||||
|
|
|
@ -3,18 +3,34 @@
|
||||||
*/
|
*/
|
||||||
package org.gcube.portlets.user.tdwx.client.event;
|
package org.gcube.portlets.user.tdwx.client.event;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author "Giancarlo Panichi" <a
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class CloseTableEvent extends GwtEvent<CloseTableEventHandler> {
|
public class CloseTableEvent extends
|
||||||
|
GwtEvent<CloseTableEvent.CloseTableEventHandler> {
|
||||||
|
|
||||||
|
public interface CloseTableEventHandler extends EventHandler {
|
||||||
|
|
||||||
|
public void onCloseTable(CloseTableEvent event);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasCloseTableEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addCloseTableEventHandler(
|
||||||
|
CloseTableEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
public static GwtEvent.Type<CloseTableEventHandler> TYPE = new Type<CloseTableEventHandler>();
|
public static GwtEvent.Type<CloseTableEventHandler> TYPE = new Type<CloseTableEventHandler>();
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Type<CloseTableEventHandler> getAssociatedType() {
|
public Type<CloseTableEventHandler> getAssociatedType() {
|
||||||
return TYPE;
|
return TYPE;
|
||||||
|
@ -22,16 +38,19 @@ public class CloseTableEvent extends GwtEvent<CloseTableEventHandler> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dispatch(CloseTableEventHandler handler) {
|
protected void dispatch(CloseTableEventHandler handler) {
|
||||||
handler.onCloseTable(this);
|
handler.onCloseTable(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source) {
|
||||||
|
source.fireEvent(new CloseTableEvent());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
return "CloseTableEvent []";
|
||||||
builder.append("OpenTableEvent []");
|
|
||||||
return builder.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.portlets.user.tdwx.client.event;
|
|
||||||
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author "Giancarlo Panichi"
|
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface CloseTableEventHandler extends EventHandler {
|
|
||||||
|
|
||||||
public void onCloseTable(CloseTableEvent event);
|
|
||||||
|
|
||||||
}
|
|
|
@ -7,23 +7,32 @@ import org.gcube.portlets.user.tdwx.shared.ColumnsReorderingConfig;
|
||||||
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author "Giancarlo Panichi" <a
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ColumnsReorderingEvent extends GwtEvent<ColumnsReorderingEvent.ColumnsReorderingEventHandler> {
|
public class ColumnsReorderingEvent extends
|
||||||
|
GwtEvent<ColumnsReorderingEvent.ColumnsReorderingEventHandler> {
|
||||||
public static GwtEvent.Type<ColumnsReorderingEventHandler> TYPE = new Type<ColumnsReorderingEventHandler>();
|
|
||||||
|
|
||||||
public interface ColumnsReorderingEventHandler extends EventHandler {
|
public interface ColumnsReorderingEventHandler extends EventHandler {
|
||||||
|
|
||||||
public void onColumnsReordering(ColumnsReorderingEvent event);
|
public void onColumnsReordering(ColumnsReorderingEvent event);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public interface HasColumnsReorderingEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addColumnsReorderingEventHandler(
|
||||||
|
ColumnsReorderingEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GwtEvent.Type<ColumnsReorderingEventHandler> TYPE = new Type<ColumnsReorderingEventHandler>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Type<ColumnsReorderingEventHandler> getAssociatedType() {
|
public Type<ColumnsReorderingEventHandler> getAssociatedType() {
|
||||||
return TYPE;
|
return TYPE;
|
||||||
|
@ -31,15 +40,21 @@ public class ColumnsReorderingEvent extends GwtEvent<ColumnsReorderingEvent.Colu
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dispatch(ColumnsReorderingEventHandler handler) {
|
protected void dispatch(ColumnsReorderingEventHandler handler) {
|
||||||
handler.onColumnsReordering(this);
|
handler.onColumnsReordering(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source,
|
||||||
|
ColumnsReorderingConfig columnsReorderingConfig) {
|
||||||
|
source.fireEvent(new ColumnsReorderingEvent(columnsReorderingConfig));
|
||||||
|
}
|
||||||
|
|
||||||
protected ColumnsReorderingConfig columnsReorderingConfig;
|
protected ColumnsReorderingConfig columnsReorderingConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param tableId
|
* @param tableId
|
||||||
*/
|
*/
|
||||||
public ColumnsReorderingEvent(ColumnsReorderingConfig columnsReorderingConfig) {
|
public ColumnsReorderingEvent(
|
||||||
|
ColumnsReorderingConfig columnsReorderingConfig) {
|
||||||
this.columnsReorderingConfig = columnsReorderingConfig;
|
this.columnsReorderingConfig = columnsReorderingConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,5 +73,4 @@ public class ColumnsReorderingEvent extends GwtEvent<ColumnsReorderingEvent.Colu
|
||||||
+ columnsReorderingConfig + "]";
|
+ columnsReorderingConfig + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,16 +3,31 @@
|
||||||
*/
|
*/
|
||||||
package org.gcube.portlets.user.tdwx.client.event;
|
package org.gcube.portlets.user.tdwx.client.event;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author "Giancarlo Panichi" <a
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class FailureEvent extends GwtEvent<FailureEventHandler> {
|
public class FailureEvent extends GwtEvent<FailureEvent.FailureEventHandler> {
|
||||||
|
|
||||||
|
|
||||||
|
public interface FailureEventHandler extends EventHandler {
|
||||||
|
|
||||||
|
public void onFailure(FailureEvent event);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasFailureEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addFailureEventHandler(
|
||||||
|
FailureEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
public static GwtEvent.Type<FailureEventHandler> TYPE = new Type<FailureEventHandler>();
|
public static GwtEvent.Type<FailureEventHandler> TYPE = new Type<FailureEventHandler>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -22,11 +37,15 @@ public class FailureEvent extends GwtEvent<FailureEventHandler> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dispatch(FailureEventHandler handler) {
|
protected void dispatch(FailureEventHandler handler) {
|
||||||
handler.onFailure(this);
|
handler.onFailure(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Throwable caught;
|
public static void fire(HasHandlers source, Throwable caught, String message) {
|
||||||
|
source.fireEvent(new FailureEvent(caught, message));
|
||||||
|
}
|
||||||
|
|
||||||
protected String message;
|
protected String message;
|
||||||
|
protected Throwable caught;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param caught
|
* @param caught
|
||||||
|
@ -51,17 +70,9 @@ public class FailureEvent extends GwtEvent<FailureEventHandler> {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
return "FailureEvent [message=" + message + ", caught=" + caught + "]";
|
||||||
builder.append("FailureEvent [caught=");
|
|
||||||
builder.append(caught);
|
|
||||||
builder.append(", message=");
|
|
||||||
builder.append(message);
|
|
||||||
builder.append("]");
|
|
||||||
return builder.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.portlets.user.tdwx.client.event;
|
|
||||||
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author "Giancarlo Panichi"
|
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface FailureEventHandler extends EventHandler {
|
|
||||||
|
|
||||||
public void onFailure(FailureEvent event);
|
|
||||||
|
|
||||||
}
|
|
|
@ -3,7 +3,10 @@
|
||||||
*/
|
*/
|
||||||
package org.gcube.portlets.user.tdwx.client.event;
|
package org.gcube.portlets.user.tdwx.client.event;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -11,7 +14,18 @@ import com.google.gwt.event.shared.GwtEvent;
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class GridReadyEvent extends GwtEvent<GridReadyEventHandler> {
|
public class GridReadyEvent extends GwtEvent<GridReadyEvent.GridReadyEventHandler> {
|
||||||
|
|
||||||
|
public interface GridReadyEventHandler extends EventHandler {
|
||||||
|
|
||||||
|
public void onGridReady(GridReadyEvent event);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface HasGridReadyEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addGridReadyEventHandler(
|
||||||
|
GridReadyEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
public static GwtEvent.Type<GridReadyEventHandler> TYPE = new Type<GridReadyEventHandler>();
|
public static GwtEvent.Type<GridReadyEventHandler> TYPE = new Type<GridReadyEventHandler>();
|
||||||
|
|
||||||
|
@ -25,7 +39,11 @@ public class GridReadyEvent extends GwtEvent<GridReadyEventHandler> {
|
||||||
handler.onGridReady(this);
|
handler.onGridReady(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source) {
|
||||||
|
source.fireEvent(new GridReadyEvent());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param tableDefinition
|
* @param tableDefinition
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.portlets.user.tdwx.client.event;
|
|
||||||
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author "Giancarlo Panichi"
|
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface GridReadyEventHandler extends EventHandler {
|
|
||||||
|
|
||||||
public void onGridReady(GridReadyEvent event);
|
|
||||||
|
|
||||||
}
|
|
|
@ -5,7 +5,10 @@ package org.gcube.portlets.user.tdwx.client.event;
|
||||||
|
|
||||||
import org.gcube.portlets.user.tdwx.shared.model.TableId;
|
import org.gcube.portlets.user.tdwx.shared.model.TableId;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -13,28 +16,43 @@ import com.google.gwt.event.shared.GwtEvent;
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class OpenTableEvent extends GwtEvent<OpenTableEventHandler> {
|
public class OpenTableEvent extends GwtEvent<OpenTableEvent.OpenTableEventHandler> {
|
||||||
|
|
||||||
|
public interface HasOpenTableEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addOpenTableEventHandler(
|
||||||
|
OpenTableEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OpenTableEventHandler extends EventHandler {
|
||||||
|
|
||||||
|
public void onOpenTable(OpenTableEvent event);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source,TableId tableId) {
|
||||||
|
source.fireEvent(new OpenTableEvent(tableId));
|
||||||
|
}
|
||||||
|
|
||||||
public static GwtEvent.Type<OpenTableEventHandler> TYPE = new Type<OpenTableEventHandler>();
|
public static GwtEvent.Type<OpenTableEventHandler> TYPE = new Type<OpenTableEventHandler>();
|
||||||
|
|
||||||
@Override
|
|
||||||
public Type<OpenTableEventHandler> getAssociatedType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void dispatch(OpenTableEventHandler handler) {
|
|
||||||
handler.onOpenTable(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected TableId tableId;
|
protected TableId tableId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param tableId
|
* @param tableId
|
||||||
*/
|
*/
|
||||||
public OpenTableEvent(TableId tableId) {
|
public OpenTableEvent(TableId tableId) {
|
||||||
this.tableId = tableId;
|
this.tableId = tableId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(OpenTableEventHandler handler) {
|
||||||
|
handler.onOpenTable(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<OpenTableEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the tableId
|
* @return the tableId
|
||||||
|
@ -43,15 +61,10 @@ public class OpenTableEvent extends GwtEvent<OpenTableEventHandler> {
|
||||||
return tableId;
|
return tableId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
return "OpenTableEvent [tableId=" + tableId + "]";
|
||||||
builder.append("OpenTableEvent [tableId=");
|
|
||||||
builder.append(tableId);
|
|
||||||
builder.append("]");
|
|
||||||
return builder.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.portlets.user.tdwx.client.event;
|
|
||||||
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author "Giancarlo Panichi"
|
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface OpenTableEventHandler extends EventHandler {
|
|
||||||
|
|
||||||
public void onOpenTable(OpenTableEvent event);
|
|
||||||
|
|
||||||
}
|
|
|
@ -5,7 +5,10 @@ package org.gcube.portlets.user.tdwx.client.event;
|
||||||
|
|
||||||
import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
|
import org.gcube.portlets.user.tdwx.shared.model.TableDefinition;
|
||||||
|
|
||||||
|
import com.google.gwt.event.shared.EventHandler;
|
||||||
import com.google.gwt.event.shared.GwtEvent;
|
import com.google.gwt.event.shared.GwtEvent;
|
||||||
|
import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -13,28 +16,46 @@ import com.google.gwt.event.shared.GwtEvent;
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class TableReadyEvent extends GwtEvent<TableReadyEventHandler> {
|
public class TableReadyEvent extends GwtEvent<TableReadyEvent.TableReadyEventHandler> {
|
||||||
|
|
||||||
|
public interface HasTableReadyEventHandler extends HasHandlers {
|
||||||
|
public HandlerRegistration addTableReadyEventHandler(
|
||||||
|
TableReadyEventHandler handler);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface TableReadyEventHandler extends EventHandler {
|
||||||
|
|
||||||
|
public void onTableReady(TableReadyEvent event);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void fire(HasHandlers source,TableDefinition tableDefinition) {
|
||||||
|
source.fireEvent(new TableReadyEvent(tableDefinition));
|
||||||
|
}
|
||||||
|
|
||||||
public static GwtEvent.Type<TableReadyEventHandler> TYPE = new Type<TableReadyEventHandler>();
|
public static GwtEvent.Type<TableReadyEventHandler> TYPE = new Type<TableReadyEventHandler>();
|
||||||
|
|
||||||
@Override
|
|
||||||
public Type<TableReadyEventHandler> getAssociatedType() {
|
|
||||||
return TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void dispatch(TableReadyEventHandler handler) {
|
|
||||||
handler.onTableReady(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected TableDefinition tableDefinition;
|
protected TableDefinition tableDefinition;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param tableDefinition
|
* @param tableDefinition
|
||||||
*/
|
*/
|
||||||
public TableReadyEvent(TableDefinition tableDefinition) {
|
public TableReadyEvent(TableDefinition tableDefinition) {
|
||||||
this.tableDefinition = tableDefinition;
|
this.tableDefinition = tableDefinition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void dispatch(TableReadyEventHandler handler) {
|
||||||
|
handler.onTableReady(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<TableReadyEventHandler> getAssociatedType() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the tableDefinition
|
* @return the tableDefinition
|
||||||
|
@ -43,15 +64,10 @@ public class TableReadyEvent extends GwtEvent<TableReadyEventHandler> {
|
||||||
return tableDefinition;
|
return tableDefinition;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder builder = new StringBuilder();
|
return "TableReadyEvent [tableDefinition=" + tableDefinition + "]";
|
||||||
builder.append("TableReadyEvent [tableDefinition=");
|
|
||||||
builder.append(tableDefinition);
|
|
||||||
builder.append("]");
|
|
||||||
return builder.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.portlets.user.tdwx.client.event;
|
|
||||||
|
|
||||||
import com.google.gwt.event.shared.EventHandler;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author "Giancarlo Panichi"
|
|
||||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface TableReadyEventHandler extends EventHandler {
|
|
||||||
|
|
||||||
public void onTableReady(TableReadyEvent event);
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue