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>
|
||||
</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 -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-map-widget</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- tabular-data-statistical-widget -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-statistical-widget</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.gwtopenmaps.openlayers</groupId>
|
||||
<artifactId>gwt-openlayers-client</artifactId>
|
||||
<version>0.6</version>
|
||||
</dependency> -->
|
||||
|
||||
|
||||
<!-- <dependency> <groupId>org.gwtopenmaps.openlayers</groupId> <artifactId>gwt-openlayers-client</artifactId>
|
||||
<version>0.6</version> </dependency> -->
|
||||
|
||||
<!--tabular-data-tasks-widget -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
|
|
|
@ -5,6 +5,7 @@ package org.gcube.portlets.user.td.client;
|
|||
|
||||
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.template.TemplateApplyDialog;
|
||||
import org.gcube.portlets.user.td.client.template.TemplateDeleteDialog;
|
||||
|
@ -843,13 +844,8 @@ public class TabularDataController {
|
|||
break;
|
||||
case ANALYSECOLUMNEDIT:
|
||||
break;
|
||||
case CHARTPIE:
|
||||
break;
|
||||
case CHARTBAR:
|
||||
break;
|
||||
case CHARTCURVE:
|
||||
break;
|
||||
case CHARTBULLS:
|
||||
case CHARTCREATE:
|
||||
openCreateChart();
|
||||
break;
|
||||
case RSTUDIO:
|
||||
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() {
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
|
||||
|
|
|
@ -35,10 +35,10 @@ public class AnalyseToolBar {
|
|||
protected EventBus eventBus;
|
||||
protected ToolBar toolBar;
|
||||
|
||||
protected TextButton pieButton;
|
||||
protected TextButton barButton;
|
||||
protected TextButton curveButton;
|
||||
protected TextButton scatterButton;
|
||||
//protected TextButton pieButton;
|
||||
protected TextButton chartCreateButton;
|
||||
//protected TextButton curveButton;
|
||||
//protected TextButton scatterButton;
|
||||
protected TextButton statisticalButton;
|
||||
protected TextButton rstudioButton;
|
||||
|
||||
|
@ -253,12 +253,12 @@ public class AnalyseToolBar {
|
|||
chartsGroup.setId("Charts");
|
||||
chartsGroup.setStyleName("ribbon");
|
||||
chartsGroup.setHeadingText("Charts");
|
||||
chartsGroup.disable();
|
||||
chartsGroup.enable();
|
||||
toolBar.add(chartsGroup);
|
||||
|
||||
FlexTable basicLayout = new FlexTable();
|
||||
chartsGroup.add(basicLayout);
|
||||
|
||||
/*
|
||||
pieButton = new TextButton("Pie",
|
||||
TabularDataResources.INSTANCE.chartPie32());
|
||||
pieButton.setScale(ButtonScale.LARGE);
|
||||
|
@ -275,24 +275,27 @@ public class AnalyseToolBar {
|
|||
|
||||
basicLayout.setWidget(0, 0, pieButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
|
||||
barButton = new TextButton("Bar",
|
||||
*/
|
||||
|
||||
chartCreateButton = new TextButton("Create",
|
||||
TabularDataResources.INSTANCE.chartBar32());
|
||||
barButton.setScale(ButtonScale.LARGE);
|
||||
barButton.setIconAlign(IconAlign.TOP);
|
||||
barButton.setToolTip("Bar");
|
||||
barButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
barButton.addSelectHandler(new SelectHandler() {
|
||||
chartCreateButton.enable();
|
||||
chartCreateButton.setScale(ButtonScale.LARGE);
|
||||
chartCreateButton.setIconAlign(IconAlign.TOP);
|
||||
chartCreateButton.setToolTip("Create charts");
|
||||
chartCreateButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
chartCreateButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
// eventBus.fireEvent(new
|
||||
// RibbonEvent(RibbonType.TABLEAGGREAGETE));
|
||||
eventBus.fireEvent(new
|
||||
RibbonEvent(RibbonType.CHARTCREATE));
|
||||
}
|
||||
});
|
||||
|
||||
basicLayout.setWidget(0, 1, barButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||
|
||||
basicLayout.setWidget(0, 0, chartCreateButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
|
||||
/*
|
||||
curveButton = new TextButton("Curve",
|
||||
TabularDataResources.INSTANCE.chartCurve32());
|
||||
curveButton.setScale(ButtonScale.LARGE);
|
||||
|
@ -326,7 +329,8 @@ public class AnalyseToolBar {
|
|||
|
||||
basicLayout.setWidget(0, 3, scatterButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||
|
||||
*/
|
||||
|
||||
cleanCells(basicLayout.getElement());
|
||||
|
||||
// Process
|
||||
|
@ -452,21 +456,25 @@ public class AnalyseToolBar {
|
|||
try {
|
||||
switch (uiStateType) {
|
||||
case START:
|
||||
chartCreateButton.disable();
|
||||
gisButton.disable();
|
||||
statisticalButton.disable();
|
||||
break;
|
||||
case TR_CLOSE:
|
||||
case TR_READONLY:
|
||||
chartCreateButton.disable();
|
||||
gisButton.disable();
|
||||
statisticalButton.disable();
|
||||
break;
|
||||
case TR_OPEN:
|
||||
case TABLEUPDATE:
|
||||
case TABLECURATION:
|
||||
chartCreateButton.enable();
|
||||
gisButton.enable();
|
||||
statisticalButton.enable();
|
||||
break;
|
||||
case WIZARD_OPEN:
|
||||
chartCreateButton.disable();
|
||||
gisButton.disable();
|
||||
statisticalButton.disable();
|
||||
break;
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
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.chartswidget.ChartsWidgetTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.mapwidget.MapWidgetTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.statisticalwidget.StatisticalWidget' />
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@
|
|||
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.chartswidget.ChartsWidgetTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.mapwidget.MapWidgetTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.statisticalwidget.StatisticalWidget' />
|
||||
<!-- <inherits name='org.gwtopenmaps.openlayers.OpenLayers' /> -->
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue