Updated Replace by External Column
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@101528 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
700a0e4bf8
commit
c12e104871
7
pom.xml
7
pom.xml
|
@ -370,6 +370,13 @@
|
|||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<!-- tabular-data-replacebyexternal-widget -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-replacebyexternal-widget</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<!-- tabular-data-map-widget -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.gcube.portlets.user.td.jsonexportwidget.client.JSONExportWidgetTD;
|
|||
import org.gcube.portlets.user.td.mainboxwidget.client.MainBoxPanel;
|
||||
import org.gcube.portlets.user.td.mapwidget.client.MapWidgetTD;
|
||||
import org.gcube.portlets.user.td.openwidget.client.TDOpen;
|
||||
import org.gcube.portlets.user.td.replacebyexternalwidget.client.ReplaceByExternalTD;
|
||||
import org.gcube.portlets.user.td.sdmxexportwidget.client.SDMXExportWizardTD;
|
||||
import org.gcube.portlets.user.td.sdmximportwidget.client.SDMXImportWizardTD;
|
||||
import org.gcube.portlets.user.td.sharewidget.client.TRShare;
|
||||
|
@ -803,6 +804,9 @@ public class TabularDataController {
|
|||
break;
|
||||
case TABLEAGGREAGETE:
|
||||
break;
|
||||
case TABLEREPLACEBYEXTERNALCOL:
|
||||
openReplaceByExternalColWizard();
|
||||
break;
|
||||
case ROWADD:
|
||||
doRowAdd();
|
||||
break;
|
||||
|
@ -1235,6 +1239,47 @@ public class TabularDataController {
|
|||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void openReplaceByExternalColWizard() {
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
|
||||
public void onSuccess() {
|
||||
openWizard();
|
||||
ReplaceByExternalTD replaceByExternalColWizard = new ReplaceByExternalTD(trId, "Replace By External Columns",
|
||||
eventBus);
|
||||
|
||||
replaceByExternalColWizard.addListener(new WizardListener() {
|
||||
public void failed(String title, String message,
|
||||
Throwable throwable) {
|
||||
UtilsGXT3.alert(title, message);
|
||||
resumeUIState();
|
||||
}
|
||||
|
||||
public void completed(TRId id) {
|
||||
openTable(id);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void putInBackground() {
|
||||
Log.debug("PutInBakground");
|
||||
}
|
||||
|
||||
public void aborted() {
|
||||
resumeUIState();
|
||||
}
|
||||
});
|
||||
|
||||
replaceByExternalColWizard.show();
|
||||
}
|
||||
|
||||
public void onFailure(Throwable reason) {
|
||||
asyncCodeLoadingFailed(reason);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected void openCreateMapWizard() {
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
|
@ -1706,7 +1751,7 @@ public class TabularDataController {
|
|||
protected void openTimeAggregate() {
|
||||
openTimeAggregate(null);
|
||||
}
|
||||
|
||||
|
||||
protected void openTimeAggregate(String columnName) {
|
||||
Log.debug("Request Time Aggregate Tab");
|
||||
if (trId != null) {
|
||||
|
@ -1721,6 +1766,9 @@ public class TabularDataController {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void openColumnLabel() {
|
||||
openColumnLabel(null);
|
||||
|
|
|
@ -408,4 +408,11 @@ public interface TabularDataResources extends ClientBundle {
|
|||
@Source("column-replace-by-expression.png")
|
||||
ImageResource columnReplaceByExpression();
|
||||
|
||||
@Source("table-replace-by-external-col_32.png")
|
||||
ImageResource replaceByExternalCol32();
|
||||
|
||||
@Source("table-replace-by-external-col.png")
|
||||
ImageResource replaceByExternalCol();
|
||||
|
||||
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 873 B |
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
|
@ -25,8 +25,10 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||
|
||||
/**
|
||||
* @author "Federico De Faveri defaveri@isti.cnr.it"
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class AnalyseToolBar {
|
||||
|
||||
|
@ -36,7 +38,7 @@ public class AnalyseToolBar {
|
|||
protected TextButton pieButton;
|
||||
protected TextButton barButton;
|
||||
protected TextButton curveButton;
|
||||
protected TextButton bullsButton;
|
||||
protected TextButton scatterButton;
|
||||
protected TextButton statisticalButton;
|
||||
protected TextButton rstudioButton;
|
||||
|
||||
|
@ -308,13 +310,13 @@ public class AnalyseToolBar {
|
|||
basicLayout.setWidget(0, 2, curveButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||
|
||||
bullsButton = new TextButton("Bulls",
|
||||
scatterButton = new TextButton("Scatter",
|
||||
TabularDataResources.INSTANCE.chartBulls32());
|
||||
bullsButton.setScale(ButtonScale.LARGE);
|
||||
bullsButton.setIconAlign(IconAlign.TOP);
|
||||
bullsButton.setToolTip("Bulls");
|
||||
bullsButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
bullsButton.addSelectHandler(new SelectHandler() {
|
||||
scatterButton.setScale(ButtonScale.LARGE);
|
||||
scatterButton.setIconAlign(IconAlign.TOP);
|
||||
scatterButton.setToolTip("Scatter");
|
||||
scatterButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
scatterButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
// eventBus.fireEvent(new
|
||||
|
@ -322,7 +324,7 @@ public class AnalyseToolBar {
|
|||
}
|
||||
});
|
||||
|
||||
basicLayout.setWidget(0, 3, bullsButton);
|
||||
basicLayout.setWidget(0, 3, scatterButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||
|
||||
cleanCells(basicLayout.getElement());
|
||||
|
|
|
@ -25,8 +25,10 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
|||
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||
|
||||
/**
|
||||
* @author "Federico De Faveri defaveri@isti.cnr.it"
|
||||
*
|
||||
* @author giancarlo
|
||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class ModifyToolBar {
|
||||
|
||||
|
@ -39,6 +41,7 @@ public class ModifyToolBar {
|
|||
protected TextButton groupbyButton;
|
||||
//protected TextButton aggregateButton;
|
||||
protected TextButton timeAggregationButton;
|
||||
protected TextButton replaceByExternalCol;
|
||||
protected TextButton addRowButton;
|
||||
protected TextButton deleteRowButton;
|
||||
protected TextButton deleteDuplicateButton;
|
||||
|
@ -163,6 +166,26 @@ public class ModifyToolBar {
|
|||
tableLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||
|
||||
|
||||
replaceByExternalCol = new TextButton("Replace by External",
|
||||
TabularDataResources.INSTANCE.replaceByExternalCol32());
|
||||
replaceByExternalCol.disable();
|
||||
replaceByExternalCol.setScale(ButtonScale.LARGE);
|
||||
replaceByExternalCol.setIconAlign(IconAlign.TOP);
|
||||
replaceByExternalCol.setToolTip("Replace by external columns");
|
||||
replaceByExternalCol.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
replaceByExternalCol.addSelectHandler(new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
eventBus.fireEvent(new RibbonEvent(RibbonType.TABLEREPLACEBYEXTERNALCOL));
|
||||
}
|
||||
});
|
||||
|
||||
tableLayout.setWidget(0, 4, replaceByExternalCol);
|
||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
|
||||
|
||||
|
||||
|
||||
|
||||
addRowButton = new TextButton("Add Row",
|
||||
TabularDataResources.INSTANCE.rowInsert32());
|
||||
addRowButton.disable();
|
||||
|
@ -177,8 +200,8 @@ public class ModifyToolBar {
|
|||
}
|
||||
});
|
||||
|
||||
tableLayout.setWidget(0, 4, addRowButton);
|
||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
|
||||
tableLayout.setWidget(0, 5, addRowButton);
|
||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 5, 2);
|
||||
|
||||
deleteRowButton = new TextButton("Delete Row",
|
||||
TabularDataResources.INSTANCE.rowRemove32());
|
||||
|
@ -194,8 +217,8 @@ public class ModifyToolBar {
|
|||
}
|
||||
});
|
||||
|
||||
tableLayout.setWidget(0, 5, deleteRowButton);
|
||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 5, 2);
|
||||
tableLayout.setWidget(0, 6, deleteRowButton);
|
||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 6, 2);
|
||||
|
||||
deleteDuplicateButton = new TextButton("Delete Duplicate",
|
||||
TabularDataResources.INSTANCE.tableDuplicateRowsRemove32());
|
||||
|
@ -211,8 +234,8 @@ public class ModifyToolBar {
|
|||
}
|
||||
});
|
||||
|
||||
tableLayout.setWidget(0, 6, deleteDuplicateButton);
|
||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 6, 2);
|
||||
tableLayout.setWidget(0, 7, deleteDuplicateButton);
|
||||
tableLayout.getFlexCellFormatter().setRowSpan(0, 7, 2);
|
||||
|
||||
/*
|
||||
annotationButton = new TextButton("Annotation",
|
||||
|
@ -324,6 +347,7 @@ public class ModifyToolBar {
|
|||
groupbyButton.disable();
|
||||
timeAggregationButton.disable();
|
||||
//aggregateButton.disable();
|
||||
replaceByExternalCol.disable();
|
||||
addRowButton.disable();
|
||||
deleteRowButton.disable();
|
||||
deleteDuplicateButton.disable();
|
||||
|
@ -340,6 +364,7 @@ public class ModifyToolBar {
|
|||
groupbyButton.disable();
|
||||
timeAggregationButton.disable();
|
||||
//aggregateButton.disable();
|
||||
replaceByExternalCol.disable();
|
||||
addRowButton.disable();
|
||||
deleteRowButton.disable();
|
||||
deleteDuplicateButton.disable();
|
||||
|
@ -357,6 +382,7 @@ public class ModifyToolBar {
|
|||
groupbyButton.enable();
|
||||
timeAggregationButton.enable();
|
||||
//aggregateButton.disable();
|
||||
replaceByExternalCol.enable();
|
||||
addRowButton.enable();
|
||||
deleteRowButton.enable();
|
||||
deleteDuplicateButton.enable();
|
||||
|
@ -372,6 +398,7 @@ public class ModifyToolBar {
|
|||
groupbyButton.disable();
|
||||
timeAggregationButton.disable();
|
||||
//aggregateButton.disable();
|
||||
replaceByExternalCol.disable();
|
||||
addRowButton.disable();
|
||||
deleteRowButton.disable();
|
||||
deleteDuplicateButton.disable();
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
<inherits
|
||||
name='org.gcube.portlets.user.td.codelistmappingimportwidget.CodelistMappingImportWizardTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.unionwizardwidget.UnionWizardTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.replacebyexternalwidget.ReplaceByExternalTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.mapwidget.MapWidgetTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.statisticalwidget.StatisticalWidget' />
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 873 B |
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
|
@ -45,6 +45,7 @@
|
|||
<inherits
|
||||
name='org.gcube.portlets.user.td.codelistmappingimportwidget.CodelistMappingImportWizardTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.unionwizardwidget.UnionWizardTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.replacebyexternalwidget.ReplaceByExternalTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.mapwidget.MapWidgetTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.statisticalwidget.StatisticalWidget' />
|
||||
<!-- <inherits name='org.gwtopenmaps.openlayers.OpenLayers' /> -->
|
||||
|
@ -64,18 +65,18 @@
|
|||
<!-- Specify the app entry point class. -->
|
||||
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<set-property name="log_DivLogger" value="ENABLED" /> <set-property
|
||||
name="log_ConsoleLogger" value="ENABLED" /> <set-property name="log_FirebugLogger"
|
||||
value="ENABLED" /> <set-property name="log_GWTLogger" value="ENABLED" />
|
||||
<set-property name="log_SystemLogger" value="ENABLED" /> -->
|
||||
|
||||
|
||||
|
||||
<set-property name="log_DivLogger" value="DISABLED" />
|
||||
<set-property name="log_ConsoleLogger" value="DISABLED" />
|
||||
<set-property name="log_FirebugLogger" value="DISABLED" />
|
||||
<set-property name="log_GWTLogger" value="DISABLED" />
|
||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||
<set-property name="log_SystemLogger" value="DISABLED" />
|
||||
<!-- Specify the paths for translatable code -->
|
||||
<source path='client' />
|
||||
<source path='shared' />
|
||||
|
|
Loading…
Reference in New Issue