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:
Giancarlo Panichi 2014-11-27 10:00:27 +00:00 committed by Giancarlo Panichi
parent 097759a53a
commit 9d451ec72d
14 changed files with 177 additions and 176 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
@ -25,13 +41,16 @@ public class CloseTableEvent extends GwtEvent<CloseTableEventHandler> {
handler.onCloseTable(this); handler.onCloseTable(this);
} }
/** public static void fire(HasHandlers source) {
* {@inheritDoc} source.fireEvent(new CloseTableEvent());
*/ }
@Override @Override
public String toString() { public String toString() {
StringBuilder builder = new StringBuilder(); return "CloseTableEvent []";
builder.append("OpenTableEvent []");
return builder.toString();
} }
} }

View File

@ -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);
}

View File

@ -7,16 +7,18 @@ 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 {
@ -24,6 +26,13 @@ public class ColumnsReorderingEvent extends GwtEvent<ColumnsReorderingEvent.Colu
} }
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;
@ -34,12 +43,18 @@ public class ColumnsReorderingEvent extends GwtEvent<ColumnsReorderingEvent.Colu
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 + "]";
} }
} }

View File

@ -3,15 +3,30 @@
*/ */
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>();
@ -25,8 +40,12 @@ public class FailureEvent extends GwtEvent<FailureEventHandler> {
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();
} }
} }

View File

@ -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);
}

View File

@ -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,6 +39,10 @@ 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

View File

@ -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);
}

View File

@ -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,20 +16,25 @@ 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;
/** /**
@ -36,6 +44,16 @@ public class OpenTableEvent extends GwtEvent<OpenTableEventHandler> {
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();
} }
} }

View File

@ -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);
}

View File

@ -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,22 +16,29 @@ 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
*/ */
@ -36,6 +46,17 @@ public class TableReadyEvent extends GwtEvent<TableReadyEventHandler> {
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();
} }
} }

View File

@ -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);
}