From d8b14c1cb216989ed9d72012a21a8aa532a7625d Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 22 Oct 2014 16:48:08 +0000 Subject: [PATCH] Added Statistical Widget git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@100892 82a268e6-3cf1-43bd-a215-b396298e98cf --- pom.xml | 18 +++++++++++++----- .../user/td/client/TabularDataController.java | 14 +++++++++++++- .../user/td/client/ribbon/AnalyseToolBar.java | 13 ++++++++++--- .../user/td/tabulardataportlet.gwt.xml | 3 ++- .../user/td/tabulardataportlet.gwt.xml | 1 + 5 files changed, 39 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index 214fbb3..bde3a53 100644 --- a/pom.xml +++ b/pom.xml @@ -241,7 +241,7 @@ tabular-data-wizard-widget [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) - + org.gcube.portlets.user @@ -376,7 +376,15 @@ tabular-data-map-widget [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) - + + + + org.gcube.portlets.user + tabular-data-statistical-widget + [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) + + + org.gcube.portlets.user @@ -397,9 +405,9 @@ tabular-data-column-operation [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) - - - + + + com.allen-sauer.gwt.log diff --git a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java index 5741a5c..8630541 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java +++ b/src/main/java/org/gcube/portlets/user/td/client/TabularDataController.java @@ -28,6 +28,7 @@ import org.gcube.portlets.user.td.openwidget.client.TDOpen; 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; +import org.gcube.portlets.user.td.statisticalwidget.client.StatisticalWidget; import org.gcube.portlets.user.td.tablewidget.client.CloneTabularResource; import org.gcube.portlets.user.td.tablewidget.client.history.HistoryDiscard; import org.gcube.portlets.user.td.tablewidget.client.rows.DeleteRows; @@ -839,6 +840,7 @@ public class TabularDataController { case RSTUDIO: break; case STATISTICAL: + openStatistical(); break; case SPREAD: break; @@ -1407,7 +1409,17 @@ public class TabularDataController { HistoryDiscard historyDiscard = new HistoryDiscard(eventBus); historyDiscard.discard(); } - + + protected void openStatistical() { + @SuppressWarnings("unused") + StatisticalWidget statisticalWidget= new StatisticalWidget(trId, eventBus); + + } + + + + + protected void openTemplateApply() { Log.debug("Template Apply call"); if (trId != null) { diff --git a/src/main/java/org/gcube/portlets/user/td/client/ribbon/AnalyseToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/ribbon/AnalyseToolBar.java index 447755a..582e43b 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/ribbon/AnalyseToolBar.java +++ b/src/main/java/org/gcube/portlets/user/td/client/ribbon/AnalyseToolBar.java @@ -332,7 +332,7 @@ public class AnalyseToolBar { processGroup.setId("Process"); processGroup.setStyleName("ribbon"); processGroup.setHeadingText("Process"); - processGroup.disable(); + processGroup.enable(); toolBar.add(processGroup); FlexTable processLayout = new FlexTable(); @@ -340,6 +340,7 @@ public class AnalyseToolBar { rstudioButton = new TextButton("R Studio", TabularDataResources.INSTANCE.rstudio32()); + rstudioButton.disable(); rstudioButton.setScale(ButtonScale.LARGE); rstudioButton.setIconAlign(IconAlign.TOP); rstudioButton.setToolTip("R Studio"); @@ -357,6 +358,7 @@ public class AnalyseToolBar { statisticalButton = new TextButton("Statistical", TabularDataResources.INSTANCE.statistical32()); + statisticalButton.disable(); statisticalButton.setScale(ButtonScale.LARGE); statisticalButton.setIconAlign(IconAlign.TOP); statisticalButton.setToolTip("Statistical"); @@ -364,8 +366,8 @@ public class AnalyseToolBar { statisticalButton.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { - // eventBus.fireEvent(new - // RibbonEvent(RibbonType.TABLEAGGREAGETE)); + eventBus.fireEvent(new + RibbonEvent(RibbonType.STATISTICAL)); } }); @@ -374,6 +376,7 @@ public class AnalyseToolBar { spreadButton = new TextButton("SPREAD", TabularDataResources.INSTANCE.cog32()); + spreadButton.disable(); spreadButton.setScale(ButtonScale.LARGE); spreadButton.setIconAlign(IconAlign.TOP); spreadButton.setToolTip("SPREAD"); @@ -448,18 +451,22 @@ public class AnalyseToolBar { switch (uiStateType) { case START: gisButton.disable(); + statisticalButton.disable(); break; case TR_CLOSE: case TR_READONLY: gisButton.disable(); + statisticalButton.disable(); break; case TR_OPEN: case TABLEUPDATE: case TABLECURATION: gisButton.enable(); + statisticalButton.enable(); break; case WIZARD_OPEN: gisButton.disable(); + statisticalButton.disable(); break; default: break; diff --git a/src/main/java/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml b/src/main/java/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml index d72a7b3..a0f53b8 100644 --- a/src/main/java/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml +++ b/src/main/java/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml @@ -48,7 +48,8 @@ name='org.gcube.portlets.user.td.codelistmappingimportwidget.CodelistMappingImportWizardTD' /> - + + diff --git a/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml b/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml index 36f9019..6cfce9c 100644 --- a/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml +++ b/src/main/resources/org/gcube/portlets/user/td/tabulardataportlet.gwt.xml @@ -46,6 +46,7 @@ name='org.gcube.portlets.user.td.codelistmappingimportwidget.CodelistMappingImportWizardTD' /> +