Added Chart Creation
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@101557 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c12e104871
commit
c576e948be
21
pom.xml
21
pom.xml
|
@ -377,27 +377,30 @@
|
||||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- tabular-data-charts-widget -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
|
<artifactId>tabular-data-charts-widget</artifactId>
|
||||||
|
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- tabular-data-map-widget -->
|
<!-- tabular-data-map-widget -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>tabular-data-map-widget</artifactId>
|
<artifactId>tabular-data-map-widget</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- tabular-data-statistical-widget -->
|
<!-- tabular-data-statistical-widget -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
<artifactId>tabular-data-statistical-widget</artifactId>
|
<artifactId>tabular-data-statistical-widget</artifactId>
|
||||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--
|
<!-- <dependency> <groupId>org.gwtopenmaps.openlayers</groupId> <artifactId>gwt-openlayers-client</artifactId>
|
||||||
<dependency>
|
<version>0.6</version> </dependency> -->
|
||||||
<groupId>org.gwtopenmaps.openlayers</groupId>
|
|
||||||
<artifactId>gwt-openlayers-client</artifactId>
|
|
||||||
<version>0.6</version>
|
|
||||||
</dependency> -->
|
|
||||||
|
|
||||||
<!--tabular-data-tasks-widget -->
|
<!--tabular-data-tasks-widget -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.user</groupId>
|
<groupId>org.gcube.portlets.user</groupId>
|
||||||
|
|
|
@ -5,6 +5,7 @@ package org.gcube.portlets.user.td.client;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.chartswidget.client.ChartsWidgetTD;
|
||||||
import org.gcube.portlets.user.td.client.logs.TDMLogs;
|
import org.gcube.portlets.user.td.client.logs.TDMLogs;
|
||||||
import org.gcube.portlets.user.td.client.template.TemplateApplyDialog;
|
import org.gcube.portlets.user.td.client.template.TemplateApplyDialog;
|
||||||
import org.gcube.portlets.user.td.client.template.TemplateDeleteDialog;
|
import org.gcube.portlets.user.td.client.template.TemplateDeleteDialog;
|
||||||
|
@ -843,13 +844,8 @@ public class TabularDataController {
|
||||||
break;
|
break;
|
||||||
case ANALYSECOLUMNEDIT:
|
case ANALYSECOLUMNEDIT:
|
||||||
break;
|
break;
|
||||||
case CHARTPIE:
|
case CHARTCREATE:
|
||||||
break;
|
openCreateChart();
|
||||||
case CHARTBAR:
|
|
||||||
break;
|
|
||||||
case CHARTCURVE:
|
|
||||||
break;
|
|
||||||
case CHARTBULLS:
|
|
||||||
break;
|
break;
|
||||||
case RSTUDIO:
|
case RSTUDIO:
|
||||||
break;
|
break;
|
||||||
|
@ -1281,6 +1277,48 @@ public class TabularDataController {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected void openCreateChart() {
|
||||||
|
GWT.runAsync(new RunAsyncCallback() {
|
||||||
|
|
||||||
|
public void onSuccess() {
|
||||||
|
openWizard();
|
||||||
|
ChartsWidgetTD mapWizard = new ChartsWidgetTD(trId, userInfo,
|
||||||
|
"Charts Creation", eventBus);
|
||||||
|
|
||||||
|
mapWizard.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();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onFailure(Throwable reason) {
|
||||||
|
asyncCodeLoadingFailed(reason);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void openCreateMapWizard() {
|
protected void openCreateMapWizard() {
|
||||||
GWT.runAsync(new RunAsyncCallback() {
|
GWT.runAsync(new RunAsyncCallback() {
|
||||||
|
|
||||||
|
|
|
@ -35,10 +35,10 @@ public class AnalyseToolBar {
|
||||||
protected EventBus eventBus;
|
protected EventBus eventBus;
|
||||||
protected ToolBar toolBar;
|
protected ToolBar toolBar;
|
||||||
|
|
||||||
protected TextButton pieButton;
|
//protected TextButton pieButton;
|
||||||
protected TextButton barButton;
|
protected TextButton chartCreateButton;
|
||||||
protected TextButton curveButton;
|
//protected TextButton curveButton;
|
||||||
protected TextButton scatterButton;
|
//protected TextButton scatterButton;
|
||||||
protected TextButton statisticalButton;
|
protected TextButton statisticalButton;
|
||||||
protected TextButton rstudioButton;
|
protected TextButton rstudioButton;
|
||||||
|
|
||||||
|
@ -253,12 +253,12 @@ public class AnalyseToolBar {
|
||||||
chartsGroup.setId("Charts");
|
chartsGroup.setId("Charts");
|
||||||
chartsGroup.setStyleName("ribbon");
|
chartsGroup.setStyleName("ribbon");
|
||||||
chartsGroup.setHeadingText("Charts");
|
chartsGroup.setHeadingText("Charts");
|
||||||
chartsGroup.disable();
|
chartsGroup.enable();
|
||||||
toolBar.add(chartsGroup);
|
toolBar.add(chartsGroup);
|
||||||
|
|
||||||
FlexTable basicLayout = new FlexTable();
|
FlexTable basicLayout = new FlexTable();
|
||||||
chartsGroup.add(basicLayout);
|
chartsGroup.add(basicLayout);
|
||||||
|
/*
|
||||||
pieButton = new TextButton("Pie",
|
pieButton = new TextButton("Pie",
|
||||||
TabularDataResources.INSTANCE.chartPie32());
|
TabularDataResources.INSTANCE.chartPie32());
|
||||||
pieButton.setScale(ButtonScale.LARGE);
|
pieButton.setScale(ButtonScale.LARGE);
|
||||||
|
@ -275,24 +275,27 @@ public class AnalyseToolBar {
|
||||||
|
|
||||||
basicLayout.setWidget(0, 0, pieButton);
|
basicLayout.setWidget(0, 0, pieButton);
|
||||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
*/
|
||||||
barButton = new TextButton("Bar",
|
|
||||||
|
chartCreateButton = new TextButton("Create",
|
||||||
TabularDataResources.INSTANCE.chartBar32());
|
TabularDataResources.INSTANCE.chartBar32());
|
||||||
barButton.setScale(ButtonScale.LARGE);
|
chartCreateButton.enable();
|
||||||
barButton.setIconAlign(IconAlign.TOP);
|
chartCreateButton.setScale(ButtonScale.LARGE);
|
||||||
barButton.setToolTip("Bar");
|
chartCreateButton.setIconAlign(IconAlign.TOP);
|
||||||
barButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
chartCreateButton.setToolTip("Create charts");
|
||||||
barButton.addSelectHandler(new SelectHandler() {
|
chartCreateButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||||
|
chartCreateButton.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
// eventBus.fireEvent(new
|
eventBus.fireEvent(new
|
||||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
RibbonEvent(RibbonType.CHARTCREATE));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
basicLayout.setWidget(0, 1, barButton);
|
basicLayout.setWidget(0, 0, chartCreateButton);
|
||||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||||
|
|
||||||
|
/*
|
||||||
curveButton = new TextButton("Curve",
|
curveButton = new TextButton("Curve",
|
||||||
TabularDataResources.INSTANCE.chartCurve32());
|
TabularDataResources.INSTANCE.chartCurve32());
|
||||||
curveButton.setScale(ButtonScale.LARGE);
|
curveButton.setScale(ButtonScale.LARGE);
|
||||||
|
@ -326,7 +329,8 @@ public class AnalyseToolBar {
|
||||||
|
|
||||||
basicLayout.setWidget(0, 3, scatterButton);
|
basicLayout.setWidget(0, 3, scatterButton);
|
||||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
basicLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||||
|
*/
|
||||||
|
|
||||||
cleanCells(basicLayout.getElement());
|
cleanCells(basicLayout.getElement());
|
||||||
|
|
||||||
// Process
|
// Process
|
||||||
|
@ -452,21 +456,25 @@ public class AnalyseToolBar {
|
||||||
try {
|
try {
|
||||||
switch (uiStateType) {
|
switch (uiStateType) {
|
||||||
case START:
|
case START:
|
||||||
|
chartCreateButton.disable();
|
||||||
gisButton.disable();
|
gisButton.disable();
|
||||||
statisticalButton.disable();
|
statisticalButton.disable();
|
||||||
break;
|
break;
|
||||||
case TR_CLOSE:
|
case TR_CLOSE:
|
||||||
case TR_READONLY:
|
case TR_READONLY:
|
||||||
|
chartCreateButton.disable();
|
||||||
gisButton.disable();
|
gisButton.disable();
|
||||||
statisticalButton.disable();
|
statisticalButton.disable();
|
||||||
break;
|
break;
|
||||||
case TR_OPEN:
|
case TR_OPEN:
|
||||||
case TABLEUPDATE:
|
case TABLEUPDATE:
|
||||||
case TABLECURATION:
|
case TABLECURATION:
|
||||||
|
chartCreateButton.enable();
|
||||||
gisButton.enable();
|
gisButton.enable();
|
||||||
statisticalButton.enable();
|
statisticalButton.enable();
|
||||||
break;
|
break;
|
||||||
case WIZARD_OPEN:
|
case WIZARD_OPEN:
|
||||||
|
chartCreateButton.disable();
|
||||||
gisButton.disable();
|
gisButton.disable();
|
||||||
statisticalButton.disable();
|
statisticalButton.disable();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
name='org.gcube.portlets.user.td.codelistmappingimportwidget.CodelistMappingImportWizardTD' />
|
name='org.gcube.portlets.user.td.codelistmappingimportwidget.CodelistMappingImportWizardTD' />
|
||||||
<inherits name='org.gcube.portlets.user.td.unionwizardwidget.UnionWizardTD' />
|
<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.replacebyexternalwidget.ReplaceByExternalTD' />
|
||||||
|
<inherits name='org.gcube.portlets.user.td.chartswidget.ChartsWidgetTD' />
|
||||||
<inherits name='org.gcube.portlets.user.td.mapwidget.MapWidgetTD' />
|
<inherits name='org.gcube.portlets.user.td.mapwidget.MapWidgetTD' />
|
||||||
<inherits name='org.gcube.portlets.user.td.statisticalwidget.StatisticalWidget' />
|
<inherits name='org.gcube.portlets.user.td.statisticalwidget.StatisticalWidget' />
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,9 @@
|
||||||
name='org.gcube.portlets.user.td.codelistmappingimportwidget.CodelistMappingImportWizardTD' />
|
name='org.gcube.portlets.user.td.codelistmappingimportwidget.CodelistMappingImportWizardTD' />
|
||||||
<inherits name='org.gcube.portlets.user.td.unionwizardwidget.UnionWizardTD' />
|
<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.replacebyexternalwidget.ReplaceByExternalTD' />
|
||||||
|
<inherits name='org.gcube.portlets.user.td.chartswidget.ChartsWidgetTD' />
|
||||||
<inherits name='org.gcube.portlets.user.td.mapwidget.MapWidgetTD' />
|
<inherits name='org.gcube.portlets.user.td.mapwidget.MapWidgetTD' />
|
||||||
<inherits name='org.gcube.portlets.user.td.statisticalwidget.StatisticalWidget' />
|
<inherits name='org.gcube.portlets.user.td.statisticalwidget.StatisticalWidget' />
|
||||||
<!-- <inherits name='org.gwtopenmaps.openlayers.OpenLayers' /> -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue