Tabular Data Portlet updated to contain Import SDMX
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@81526 82a268e6-3cf1-43bd-a215-b396298e98cf
1956
.gwt/.gwt-log
|
@ -1,3 +1,4 @@
|
|||
#Thu Jun 16 10:18:26 CEST 2011
|
||||
eclipse.preferences.version=1
|
||||
filesCopiedToWebInfLib=
|
||||
googleCloudSqlEnabled=false
|
||||
localDevMySqlEnabled=true
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.m2e.wtp.ear.applicationXmlInBuilDir=false
|
||||
org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=true
|
||||
org.eclipse.m2e.wtp.war.archiverFilesInBuilDir=false
|
|
@ -1,11 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="${module}">
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="sdmx-import-wizard-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/sdmx-import-wizard/sdmx-import-wizard">
|
||||
<dependent-module archiveName="csv-import-wizard-gxt3-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/csv-import-wizard-gxt3/csv-import-wizard-gxt3">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="csv-import-wizard-workspace-gxt3-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/csv-import-wizard-workspace-gxt3/csv-import-wizard-workspace-gxt3">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="SDMXImportWizardTD-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/SDMXImportWizardTD/SDMXImportWizardTD">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="TDOpen-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-open/tabular-data-open">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
|
|
64
pom.xml
|
@ -13,7 +13,6 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>tabular-data-portlet</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<name>Tabular data portlet</name>
|
||||
|
||||
|
@ -28,6 +27,7 @@
|
|||
<GLOBUS_LOCATION>${env.GLOBUS_LOCATION}</GLOBUS_LOCATION>
|
||||
<!-- GWT needs at least java 1.5 -->
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -47,12 +47,12 @@
|
|||
<dependency>
|
||||
<groupId>com.sencha.gxt</groupId>
|
||||
<artifactId>gxt</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>aslsocial</artifactId>
|
||||
<version>[0.1.0-SNAPSHOT, 1.0.0-SNAPSHOT)</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -87,6 +87,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.applicationsupportlayer</groupId>
|
||||
<artifactId>aslcore</artifactId>
|
||||
<version>[3.0.0-SNAPSHOT,4.0.0-SNAPSHOT)</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
@ -95,21 +96,17 @@
|
|||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>org.gcube.portlets.user</groupId> -->
|
||||
<!-- <artifactId>workspace-light-tree-gxt3</artifactId> -->
|
||||
<!-- <version>2.9.1-SNAPSHOT</version> -->
|
||||
<!-- </dependency> -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>workspace-light-tree</artifactId>
|
||||
<version>2.10.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- WORKSPACE -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>workspace-tree-widget</artifactId>
|
||||
</dependency>
|
||||
<!-- <dependency> -->
|
||||
<!-- <groupId>org.gcube.portal</groupId> -->
|
||||
<!-- <artifactId>workspaceportletlighttree</artifactId> -->
|
||||
<!-- <version>2.7.0</version> -->
|
||||
<!-- </dependency> -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -155,47 +152,41 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>td-csv-importer-widget</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT]</version>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>td-csv-importer-widget</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT]</version>
|
||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
||||
<classifier>sources</classifier>
|
||||
</dependency>
|
||||
|
||||
<!-- SDMX IMPORT WIZARD -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>sdmx-import-wizard</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
<!-- <classifier>sources</classifier> -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>log4j-over-slf4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<artifactId>SDMXImportWizardTD</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- TABULAR DATA OPEN -->
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>sdmx-import-wizard</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
<classifier>sources</classifier>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>log4j-over-slf4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<artifactId>TDOpen</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.data.analysis.tabulardata</groupId>
|
||||
<artifactId>service-client-mock</artifactId>
|
||||
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- Generate compiled stuff in the folder used for developing mode -->
|
||||
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
|
||||
|
||||
<plugins>
|
||||
|
||||
<!-- GWT Maven Plugin -->
|
||||
|
@ -233,13 +224,12 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>maven-portal-bom</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
|
||||
<packaging>war</packaging>
|
||||
</project>
|
||||
|
|
|
@ -3,34 +3,41 @@
|
|||
*/
|
||||
package org.gcube.portlets.user.td.client;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.sdmximportwizard.client.SDMXImportWizardWindow;
|
||||
import org.gcube.portlets.user.sdmximportwizard.client.SDMXWizardSelectionEvent;
|
||||
import org.gcube.portlets.user.sdmximportwizard.client.SDMXWizardSelectionEvent.WizardSelectionHandler;
|
||||
import org.gcube.portlets.user.sdmximportwizard.shared.Dataset;
|
||||
import org.gcube.portlets.user.td.ciw.client.CSVImporterWidget;
|
||||
import org.gcube.portlets.user.td.client.event.ImportTableEvent;
|
||||
import org.gcube.portlets.user.td.client.event.ImportTableType;
|
||||
import org.gcube.portlets.user.td.client.event.OpenTabularResourceEvent;
|
||||
import org.gcube.portlets.user.td.client.event.OpenTabularResourceType;
|
||||
import org.gcube.portlets.user.td.importer.client.TabularDataImporterListener;
|
||||
import org.gcube.portlets.user.td.open.client.TDOpen;
|
||||
import org.gcube.portlets.user.sdmximportwizardtd.client.SDMXImportWizardTD;
|
||||
import org.gcube.portlets.user.sdmximportwizardtd.client.general.WizardListener;
|
||||
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.core.client.RunAsyncCallback;
|
||||
import com.google.gwt.event.logical.shared.CloseEvent;
|
||||
import com.google.gwt.event.logical.shared.CloseHandler;
|
||||
import com.google.gwt.event.logical.shared.HasCloseHandlers;
|
||||
import com.google.gwt.event.logical.shared.HasOpenHandlers;
|
||||
import com.google.gwt.event.logical.shared.OpenEvent;
|
||||
import com.google.gwt.event.logical.shared.OpenHandler;
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
import com.google.gwt.event.shared.HandlerRegistration;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.google.web.bindery.event.shared.SimpleEventBus;
|
||||
import com.sencha.gxt.widget.core.client.info.Info;
|
||||
|
||||
/**
|
||||
* @author "Federico De Faveri defaveri@isti.cnr.it"
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class TabularDataController {
|
||||
|
||||
protected EventBus eventBus;
|
||||
|
||||
public TabularDataController()
|
||||
{
|
||||
public class TabularDataController {
|
||||
//implements HasCloseHandlers<Long>, HasOpenHandlers<Long> {
|
||||
|
||||
protected SimpleEventBus eventBus;
|
||||
|
||||
public TabularDataController() {
|
||||
eventBus = new SimpleEventBus();
|
||||
bindToEvents();
|
||||
}
|
||||
|
@ -42,106 +49,245 @@ public class TabularDataController {
|
|||
return eventBus;
|
||||
}
|
||||
|
||||
protected void bindToEvents()
|
||||
{
|
||||
eventBus.addHandler(ImportTableEvent.TYPE, new ImportTableEvent.ImportTableHandler() {
|
||||
|
||||
@Override
|
||||
public void onImportTable(ImportTableEvent event) {
|
||||
doImportTable(event.getImportType());
|
||||
}
|
||||
});
|
||||
protected void bindToEvents() {
|
||||
eventBus.addHandler(ImportTableEvent.TYPE,
|
||||
new ImportTableEvent.ImportTableHandler() {
|
||||
|
||||
@Override
|
||||
public void onImportTable(ImportTableEvent event) {
|
||||
doImportTable(event.getImportType());
|
||||
}
|
||||
});
|
||||
eventBus.addHandler(OpenTabularResourceEvent.TYPE,
|
||||
new OpenTabularResourceEvent.OpenTabularResourceHandler() {
|
||||
|
||||
@Override
|
||||
public void onOpenTabularResource(OpenTabularResourceEvent event) {
|
||||
doOpenTabularResource(event.getOpenType());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void doImportTable(ImportTableType importType)
|
||||
{
|
||||
Log.trace("doImportTable importType: "+importType);
|
||||
Info.display("ImportTableEvent", "importType: "+importType);
|
||||
switch (importType) {
|
||||
case SDMX: openSDMXDatasetImportWizard(); break;
|
||||
case CSV: openCSVImportWizard(); break;
|
||||
|
||||
public void doImportTable(ImportTableType importType) {
|
||||
Log.trace("doImportTable importType: " + importType);
|
||||
Info.display("ImportTableEvent", "importType: " + importType);
|
||||
try {
|
||||
switch (importType) {
|
||||
case SDMX:
|
||||
openSDMXImportWizard();
|
||||
break;
|
||||
case CSV:
|
||||
openCSVImportWizard();
|
||||
break;
|
||||
case JSON:
|
||||
openCSVImportWizard();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.error("doImportTable Error : " + e.getLocalizedMessage()+ " \n "+e.getCause());
|
||||
}
|
||||
}
|
||||
|
||||
public void doOpenTabularResource(OpenTabularResourceType openType) {
|
||||
Log.trace("doOpenTabularResource openType: " + openType);
|
||||
Info.display("OpenTabularResourceEvent", "openType: " + openType);
|
||||
try {
|
||||
switch (openType) {
|
||||
case TABLE:
|
||||
openTabularResources();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Log.error("doOpenTable Error : " + e.getLocalizedMessage()+ " \n "+e.getCause());
|
||||
}
|
||||
}
|
||||
|
||||
protected void openSDMXDatasetImportWizard()
|
||||
{
|
||||
protected void openSDMXImportWizard() {
|
||||
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
SDMXImportWizardWindow<Dataset> importWizard = SDMXImportWizardWindow.getDatasetWizard();
|
||||
|
||||
importWizard.addWizardSelectionHandler(new WizardSelectionHandler<Dataset>() {
|
||||
SDMXImportWizardTD importWizard= new SDMXImportWizardTD("SDMX Import");
|
||||
|
||||
@Override
|
||||
public void onSelected(SDMXWizardSelectionEvent<Dataset> event) {
|
||||
doSDMXDatasetImport(event.getSelected());
|
||||
}
|
||||
importWizard.addListener(new WizardListener(){
|
||||
|
||||
@Override
|
||||
public void onClosed(SDMXWizardSelectionEvent<Dataset> event) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
importWizard.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable reason) {
|
||||
asyncCodeLoadingFailed(reason);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void doSDMXDatasetImport(List<Dataset> datasets)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void openCSVImportWizard()
|
||||
{
|
||||
/*GWT.runAsync(new RunAsyncCallback() {
|
||||
|
||||
@Override
|
||||
public void onSuccess() {*/
|
||||
CSVImporterWidget csvImporterWidget = new CSVImporterWidget();
|
||||
csvImporterWidget.show(new TabularDataImporterListener() {
|
||||
|
||||
@Override
|
||||
public void failed(Throwable throwable, String reason, String details) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void completed() {
|
||||
// TODO Auto-generated method stub
|
||||
//TableId importWizard.getTable(index);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void aborted() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
/*}
|
||||
|
||||
@Override
|
||||
public void failed(Throwable throwable, String reason,
|
||||
String details) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
/*
|
||||
importWizard.addWizardSelectionHandler(new WizardSelectionHandler<Dataset>() {
|
||||
|
||||
@Override
|
||||
public void onSelected(
|
||||
SDMXWizardSelectionEvent<Dataset> event) {
|
||||
doSDMXDatasetImport(event.getSelected());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClosed(
|
||||
SDMXWizardSelectionEvent<Dataset> event) {
|
||||
|
||||
}
|
||||
});*/
|
||||
|
||||
importWizard.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable reason) {
|
||||
asyncCodeLoadingFailed(reason);
|
||||
}
|
||||
});*/
|
||||
}
|
||||
|
||||
protected void asyncCodeLoadingFailed(Throwable reason)
|
||||
{
|
||||
Log.error("Async code loading failed", reason);
|
||||
Info.display("Async code loading failed", "Please retry to lunch the operation");
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected void openTabularResources() {
|
||||
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
TDOpen tdOpen= new TDOpen("Tabular Resources Open");
|
||||
|
||||
tdOpen.addListener(new org.gcube.portlets.user.td.open.client.general.WizardListener(){
|
||||
|
||||
@Override
|
||||
public void completed() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void aborted() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void failed(Throwable throwable, String reason,
|
||||
String details) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
tdOpen.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable reason) {
|
||||
asyncCodeLoadingFailed(reason);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
protected void doSDMXDatasetImport(List<Dataset> datasets) {
|
||||
Log.info("doSDMXDatasetImport: " + datasets.size());
|
||||
for (Dataset d : datasets) {
|
||||
Log.info("Dataset: " + d.getId() + d.getName() + d.getAgencyId());
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
protected void openCSVImportWizard() {
|
||||
/*
|
||||
* GWT.runAsync(new RunAsyncCallback() {
|
||||
*
|
||||
* @Override public void onSuccess() {
|
||||
*/
|
||||
CSVImporterWidget csvImporterWidget = new CSVImporterWidget();
|
||||
csvImporterWidget.show(new TabularDataImporterListener() {
|
||||
|
||||
@Override
|
||||
public void failed(Throwable throwable, String reason,
|
||||
String details) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void completed() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void aborted() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
* }
|
||||
*
|
||||
* @Override public void onFailure(Throwable reason) {
|
||||
* asyncCodeLoadingFailed(reason); } });
|
||||
*/
|
||||
}
|
||||
|
||||
protected void asyncCodeLoadingFailed(Throwable reason) {
|
||||
Log.error("Async code loading failed", reason);
|
||||
Info.display("Async code loading failed",
|
||||
"Please retry to lunch the operation");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
||||
@Override
|
||||
public HandlerRegistration addCloseHandler(CloseHandler<Long> handler) {
|
||||
//return eventBus.addHandler(CloseEvent.getType(), handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
||||
@Override
|
||||
public HandlerRegistration addOpenHandler(OpenHandler<Long> handler) {
|
||||
//return eventBus.addHandler(OpenEvent.getType(), handler);
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
|
||||
@Override
|
||||
public void fireEvent(GwtEvent<?> event) {
|
||||
eventBus.fireEvent(event);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,39 +1,29 @@
|
|||
package org.gcube.portlets.user.td.client;
|
||||
|
||||
import org.gcube.portlets.user.td.client.ribbon.TabularDataRibbon;
|
||||
import org.gcube.portlets.user.td.client.rpc.TabularDataService;
|
||||
import org.gcube.portlets.user.td.client.rpc.TabularDataServiceAsync;
|
||||
import org.gcube.portlets.user.td.client.toolbar.TabularDataTooBar;
|
||||
|
||||
import org.gcube.portlets.user.tdw.client.TabularData;
|
||||
import org.gcube.portlets.user.tdw.client.TabularDataGridPanel;
|
||||
import org.gcube.portlets.user.tdw.client.event.FailureEvent;
|
||||
import org.gcube.portlets.user.tdw.client.event.FailureEventHandler;
|
||||
import org.gcube.portlets.user.workspace.client.AppControllerExplorer;
|
||||
import org.gcube.portlets.user.workspace.client.view.ExplorerPanel;
|
||||
import org.gcube.portlets.user.workspace.client.view.tree.AsyncTreePanel;
|
||||
import org.gcube.portlets.user.tdw.shared.model.TableId;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.core.client.EntryPoint;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.widget.core.client.ContentPanel;
|
||||
import com.sencha.gxt.widget.core.client.TabPanel;
|
||||
import com.sencha.gxt.widget.core.client.TabPanel.TabPanelAppearance;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer.BorderLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||
import com.sencha.gxt.widget.core.client.container.NorthSouthContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.Viewport;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||
import com.sencha.gxt.widget.core.client.info.Info;
|
||||
|
||||
/**
|
||||
|
@ -87,7 +77,9 @@ public class TabularDataPortlet implements EntryPoint {
|
|||
final BorderLayoutContainer mainPanelLayout = new BorderLayoutContainer();
|
||||
mainPanelLayout.setBorders(true);
|
||||
|
||||
TabularDataTooBar tabularDataTooBar = new TabularDataTooBar(eventBus);
|
||||
|
||||
//Ribbon Menu
|
||||
TabularDataRibbon tabularDataTooBar = new TabularDataRibbon(eventBus);
|
||||
Widget toolBarPanel = tabularDataTooBar.getContainer();
|
||||
|
||||
BorderLayoutData toolBarData = new BorderLayoutData(122);
|
||||
|
@ -97,27 +89,8 @@ public class TabularDataPortlet implements EntryPoint {
|
|||
|
||||
mainPanelLayout.setNorthWidget(toolBarPanel, toolBarData);
|
||||
|
||||
ContentPanel workspaceTreePanel = new ContentPanel();
|
||||
workspaceTreePanel.setHeaderVisible(false);
|
||||
|
||||
AppControllerExplorer workspaceTree = new AppControllerExplorer();
|
||||
ExplorerPanel explorerPanel = workspaceTree.getPanel();
|
||||
AsyncTreePanel asyncTreePanel = explorerPanel.getAsycTreePanel();
|
||||
asyncTreePanel.setSizeTreePanel(TOOLBOX_WIDTH, TOOLBOX_HEIGHT);
|
||||
asyncTreePanel.setHeaderTreeVisible(false);
|
||||
|
||||
workspaceTreePanel.add(asyncTreePanel);
|
||||
workspaceTreePanel.setHeaderVisible(true);
|
||||
workspaceTreePanel.setHeadingText("Workspace Tree");
|
||||
|
||||
BorderLayoutData workspaceTreeData = new BorderLayoutData(TOOLBOX_WIDTH);
|
||||
workspaceTreeData.setCollapsible(true);
|
||||
workspaceTreeData.setSplit(true);
|
||||
workspaceTreeData.setCollapseMini(true);
|
||||
workspaceTreeData.setMargins(new Margins(0, 5, 0, 5));
|
||||
|
||||
mainPanelLayout.setWestWidget(workspaceTreePanel, workspaceTreeData);
|
||||
|
||||
//Grid
|
||||
final TabularData tabularData = new TabularData("SimpleJDBCDataSourceFactory");
|
||||
tabularData.addFailureHandler(new FailureEventHandler() {
|
||||
|
||||
|
@ -127,30 +100,17 @@ public class TabularDataPortlet implements EntryPoint {
|
|||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
final TabularDataGridPanel grid = tabularData.getGridPanel();
|
||||
|
||||
MarginData gridData = new MarginData();
|
||||
|
||||
mainPanelLayout.setCenterWidget(grid, gridData);
|
||||
|
||||
|
||||
|
||||
//TableId tableopening=new TableId("SimpleJDBCDataSourceFactory","1");
|
||||
//tabularData.openTable(tableopening);
|
||||
//Main
|
||||
SimpleContainer mainPanel = new SimpleContainer();
|
||||
mainPanel.add(mainPanelLayout);
|
||||
|
||||
|
||||
|
||||
/*VerticalPanel mainPanel = new VerticalPanel();
|
||||
|
||||
TextButton button = new TextButton("Test");
|
||||
button.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
Info.display("Button event", "Button pressed");
|
||||
}
|
||||
});
|
||||
mainPanel.add(button);*/
|
||||
|
||||
bind(mainPanel);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,9 +8,7 @@ package org.gcube.portlets.user.td.client.event;
|
|||
*
|
||||
*/
|
||||
public enum ImportTableType {
|
||||
|
||||
NONE,
|
||||
CSV,
|
||||
SDMX;
|
||||
|
||||
SDMX,
|
||||
JSON;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
package org.gcube.portlets.user.td.client.event;
|
||||
|
||||
import com.google.gwt.event.shared.GwtEvent;
|
||||
import com.google.gwt.event.shared.EventHandler;
|
||||
|
||||
import com.google.gwt.event.shared.HasHandlers;
|
||||
|
||||
public class OpenTabularResourceEvent extends GwtEvent<OpenTabularResourceEvent.OpenTabularResourceHandler> {
|
||||
|
||||
public static Type<OpenTabularResourceHandler> TYPE = new Type<OpenTabularResourceHandler>();
|
||||
private OpenTabularResourceType openType;
|
||||
|
||||
public interface OpenTabularResourceHandler extends EventHandler {
|
||||
void onOpenTabularResource(OpenTabularResourceEvent event);
|
||||
}
|
||||
|
||||
public OpenTabularResourceEvent(OpenTabularResourceType openType) {
|
||||
this.openType = openType;
|
||||
}
|
||||
|
||||
public OpenTabularResourceType getOpenType() {
|
||||
return openType;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatch(OpenTabularResourceHandler handler) {
|
||||
handler.onOpenTabularResource(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type<OpenTabularResourceHandler> getAssociatedType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public static Type<OpenTabularResourceHandler> getType() {
|
||||
return TYPE;
|
||||
}
|
||||
|
||||
public static void fire(HasHandlers source, OpenTabularResourceType openType) {
|
||||
source.fireEvent(new OpenTabularResourceEvent(openType));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.td.client.event;
|
||||
|
||||
/**
|
||||
* @author "Federico De Faveri defaveri@isti.cnr.it"
|
||||
*
|
||||
*/
|
||||
public enum OpenTabularResourceType {
|
||||
TABLE;
|
||||
}
|
|
@ -15,45 +15,133 @@ public interface TabularDataResources extends ClientBundle {
|
|||
|
||||
public static final TabularDataResources INSTANCE = GWT.create(TabularDataResources.class);
|
||||
|
||||
@Source("table_import.png")
|
||||
ImageResource importTD();
|
||||
|
||||
@Source("table_export.png")
|
||||
ImageResource exportTD();
|
||||
|
||||
|
||||
@Source("page-white-add_32.png")
|
||||
ImageResource open32();
|
||||
|
||||
@Source("disk.png")
|
||||
ImageResource save();
|
||||
|
||||
@Source("disk_32.png")
|
||||
ImageResource save32();
|
||||
|
||||
@Source("close-red.png")
|
||||
ImageResource close();
|
||||
|
||||
@Source("properties.png")
|
||||
ImageResource properties();
|
||||
|
||||
|
||||
@Source("sdmx.png")
|
||||
ImageResource sdmx();
|
||||
|
||||
@Source("sdmx_32.png")
|
||||
ImageResource sdmx32();
|
||||
|
||||
@Source("gis.png")
|
||||
ImageResource gis();
|
||||
|
||||
@Source("gis_32.png")
|
||||
ImageResource gis32();
|
||||
|
||||
|
||||
@Source("csv.png")
|
||||
ImageResource csv();
|
||||
|
||||
@Source("excel.png")
|
||||
ImageResource excel();
|
||||
@Source("json.png")
|
||||
ImageResource json();
|
||||
|
||||
@Source("chart_bar.png")
|
||||
|
||||
@Source("chart-bar.png")
|
||||
ImageResource chart();
|
||||
|
||||
@Source("chart_bullseye.png")
|
||||
ImageResource chartBullsEye();
|
||||
@Source("chart-bar_32.png")
|
||||
ImageResource chartBar32();
|
||||
|
||||
@Source("chart_curve.png")
|
||||
@Source("chart-bulls.png")
|
||||
ImageResource chartBulls();
|
||||
|
||||
@Source("chart-bulls_32.png")
|
||||
ImageResource chartBulls32();
|
||||
|
||||
@Source("chart-curve.png")
|
||||
ImageResource chartCurve();
|
||||
|
||||
@Source("chart_pie.png")
|
||||
@Source("chart-curve_32.png")
|
||||
ImageResource chartCurve32();
|
||||
|
||||
|
||||
@Source("chart-pie.png")
|
||||
ImageResource chartPie();
|
||||
|
||||
@Source("chart.png")
|
||||
ImageResource chartBar();
|
||||
@Source("chart-pie_32.png")
|
||||
ImageResource chartPie32();
|
||||
|
||||
@Source("rstudio.png")
|
||||
|
||||
@Source("RStudio.png")
|
||||
ImageResource rstudio();
|
||||
|
||||
@Source("sm.png")
|
||||
ImageResource sm();
|
||||
@Source("RStudio_32.png")
|
||||
ImageResource rstudio32();
|
||||
|
||||
@Source("validation.png")
|
||||
@Source("statistical.png")
|
||||
ImageResource statistical();
|
||||
|
||||
@Source("statistical_32.png")
|
||||
ImageResource statistical32();
|
||||
|
||||
@Source("table-validate_32.png")
|
||||
ImageResource validation32();
|
||||
|
||||
|
||||
@Source("table-validate.png")
|
||||
ImageResource validation();
|
||||
|
||||
|
||||
@Source("rules.png")
|
||||
ImageResource rules();
|
||||
|
||||
@Source("rules_32.png")
|
||||
ImageResource rules32();
|
||||
|
||||
|
||||
@Source("table-filter_32.png")
|
||||
ImageResource filter32();
|
||||
|
||||
@Source("table-union_32.png")
|
||||
ImageResource union32();
|
||||
|
||||
|
||||
|
||||
@Source("table-denormalize_32.png")
|
||||
ImageResource denormalize32();
|
||||
|
||||
@Source("table-group_32.png")
|
||||
ImageResource group32();
|
||||
|
||||
@Source("table-aggregate.png")
|
||||
ImageResource aggregate();
|
||||
|
||||
@Source("table-aggregate_32.png")
|
||||
ImageResource aggregate32();
|
||||
|
||||
|
||||
@Source("history_32.png")
|
||||
ImageResource history32();
|
||||
|
||||
@Source("arrow-undo_32.png")
|
||||
ImageResource discard32();
|
||||
|
||||
@Source("arrow-undo.png")
|
||||
ImageResource discard();
|
||||
|
||||
@Source("arrow-undo-all_32.png")
|
||||
ImageResource discardAll32();
|
||||
|
||||
@Source("arrow-undo-all.png")
|
||||
ImageResource discardAll();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,176 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.td.client.ribbon;
|
||||
|
||||
import org.gcube.portlets.user.td.client.resource.TabularDataResources;
|
||||
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.dom.client.NodeList;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonArrowAlign;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonScale;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
||||
import com.sencha.gxt.core.client.dom.XElement;
|
||||
import com.sencha.gxt.widget.core.client.button.ButtonGroup;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
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"
|
||||
*
|
||||
*/
|
||||
public class ChartsToolBar {
|
||||
|
||||
protected EventBus eventBus;
|
||||
protected ToolBar toolBar;
|
||||
|
||||
protected TextButton pieButton;
|
||||
protected TextButton barButton;
|
||||
protected TextButton curveButton;
|
||||
protected TextButton bullsButton;
|
||||
|
||||
protected TextButton gisButton;
|
||||
|
||||
|
||||
|
||||
public ChartsToolBar(EventBus eventBus)
|
||||
{
|
||||
this.eventBus = eventBus;
|
||||
toolBar = new ToolBar();
|
||||
build();
|
||||
}
|
||||
|
||||
public ToolBar getToolBar()
|
||||
{
|
||||
return toolBar;
|
||||
}
|
||||
|
||||
protected void build()
|
||||
{
|
||||
toolBar.setHeight("94px");
|
||||
|
||||
ButtonGroup basicGroup = new ButtonGroup();
|
||||
basicGroup.setHeight("78px");
|
||||
basicGroup.setStyleName("margin:2px");
|
||||
basicGroup.setHeadingText("Basic");
|
||||
toolBar.add(basicGroup);
|
||||
|
||||
FlexTable basicLayout = new FlexTable();
|
||||
basicGroup.add(basicLayout);
|
||||
|
||||
pieButton = new TextButton("Pie", TabularDataResources.INSTANCE.chartPie32());
|
||||
pieButton.setScale(ButtonScale.LARGE);
|
||||
pieButton.setIconAlign(IconAlign.TOP);
|
||||
pieButton.setToolTip("Pie");
|
||||
pieButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
pieButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
basicLayout.setWidget(0, 0, pieButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
|
||||
|
||||
barButton = new TextButton("Bar", TabularDataResources.INSTANCE.chartBar32());
|
||||
barButton.setScale(ButtonScale.LARGE);
|
||||
barButton.setIconAlign(IconAlign.TOP);
|
||||
barButton.setToolTip("Bar");
|
||||
barButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
barButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
basicLayout.setWidget(0, 1, barButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||
|
||||
|
||||
curveButton = new TextButton("Curve", TabularDataResources.INSTANCE.chartCurve32());
|
||||
curveButton.setScale(ButtonScale.LARGE);
|
||||
curveButton.setIconAlign(IconAlign.TOP);
|
||||
curveButton.setToolTip("Curve");
|
||||
curveButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
curveButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
basicLayout.setWidget(0, 2, curveButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||
|
||||
bullsButton = new TextButton("Bulls", TabularDataResources.INSTANCE.chartBulls32());
|
||||
bullsButton.setScale(ButtonScale.LARGE);
|
||||
bullsButton.setIconAlign(IconAlign.TOP);
|
||||
bullsButton.setToolTip("Bulls");
|
||||
bullsButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
bullsButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
basicLayout.setWidget(0, 3, bullsButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||
|
||||
|
||||
cleanCells(basicLayout.getElement());
|
||||
|
||||
|
||||
//GIS
|
||||
ButtonGroup gisGroup = new ButtonGroup();
|
||||
gisGroup.setHeight("78px");
|
||||
gisGroup.setStyleName("margin:2px");
|
||||
gisGroup.setHeadingText("GIS");
|
||||
toolBar.add(gisGroup);
|
||||
|
||||
FlexTable gisLayout = new FlexTable();
|
||||
gisGroup.add(gisLayout);
|
||||
|
||||
gisButton = new TextButton("GIS", TabularDataResources.INSTANCE.gis32());
|
||||
gisButton.setScale(ButtonScale.LARGE);
|
||||
gisButton.setIconAlign(IconAlign.TOP);
|
||||
gisButton.setToolTip("GIS");
|
||||
gisButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
gisButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
gisLayout.setWidget(0, 0, gisButton);
|
||||
gisLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
|
||||
cleanCells(gisLayout.getElement());
|
||||
|
||||
}
|
||||
|
||||
protected void cleanCells(Element elem) {
|
||||
NodeList<Element> tds = elem.<XElement> cast().select("td");
|
||||
for (int i = 0; i < tds.getLength(); i++) {
|
||||
Element td = tds.getItem(i);
|
||||
|
||||
if (!td.hasChildNodes() && td.getClassName().equals("")) {
|
||||
td.removeFromParent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,228 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.td.client.ribbon;
|
||||
|
||||
import org.gcube.portlets.user.td.client.event.ImportTableEvent;
|
||||
import org.gcube.portlets.user.td.client.event.ImportTableType;
|
||||
import org.gcube.portlets.user.td.client.event.OpenTabularResourceEvent;
|
||||
import org.gcube.portlets.user.td.client.event.OpenTabularResourceType;
|
||||
import org.gcube.portlets.user.td.client.resource.TabularDataResources;
|
||||
|
||||
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.dom.client.NodeList;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonArrowAlign;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonScale;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
||||
import com.sencha.gxt.core.client.dom.XElement;
|
||||
import com.sencha.gxt.widget.core.client.button.ButtonGroup;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author "Giancarlo Panichi"
|
||||
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||
*
|
||||
*/
|
||||
public class FileToolBar {
|
||||
|
||||
protected EventBus eventBus;
|
||||
protected ToolBar toolBar;
|
||||
|
||||
protected TextButton openButton;
|
||||
protected TextButton saveButton;
|
||||
protected TextButton closeButton;
|
||||
protected TextButton propertiesButton;
|
||||
|
||||
|
||||
protected TextButton importCSVButton;
|
||||
protected TextButton importJSONButton;
|
||||
protected TextButton importSDMXButton;
|
||||
|
||||
protected TextButton exportSDMXButton;
|
||||
protected TextButton exportCSVButton;
|
||||
protected TextButton exportJSONButton;
|
||||
|
||||
public FileToolBar(EventBus eventBus)
|
||||
{
|
||||
this.eventBus = eventBus;
|
||||
toolBar = new ToolBar();
|
||||
build();
|
||||
}
|
||||
|
||||
public ToolBar getToolBar()
|
||||
{
|
||||
return toolBar;
|
||||
}
|
||||
|
||||
protected void build()
|
||||
{
|
||||
toolBar.setHeight("94px");
|
||||
|
||||
//File
|
||||
ButtonGroup dataGroup = new ButtonGroup();
|
||||
dataGroup.setHeight("78px");
|
||||
dataGroup.setStyleName("margin:2px");
|
||||
dataGroup.setHeadingText("File");
|
||||
toolBar.add(dataGroup);
|
||||
|
||||
FlexTable dataLayout = new FlexTable();
|
||||
dataGroup.add(dataLayout);
|
||||
|
||||
openButton = new TextButton("Open", TabularDataResources.INSTANCE.open32());
|
||||
openButton.setScale(ButtonScale.LARGE);
|
||||
openButton.setIconAlign(IconAlign.TOP);
|
||||
openButton.setToolTip("Open table");
|
||||
openButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
openButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
eventBus.fireEvent(new OpenTabularResourceEvent(OpenTabularResourceType.TABLE));
|
||||
}
|
||||
});
|
||||
|
||||
dataLayout.setWidget(0, 0, openButton);
|
||||
dataLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
|
||||
saveButton = new TextButton("Save", TabularDataResources.INSTANCE.save32());
|
||||
saveButton.setScale(ButtonScale.LARGE);
|
||||
saveButton.setIconAlign(IconAlign.TOP);
|
||||
saveButton.setToolTip("Save table");
|
||||
saveButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
saveButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.SDMX));
|
||||
}
|
||||
});
|
||||
|
||||
dataLayout.setWidget(0, 1, saveButton);
|
||||
dataLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||
|
||||
|
||||
|
||||
closeButton = new TextButton("Close", TabularDataResources.INSTANCE.close());
|
||||
closeButton.setToolTip("Close table");
|
||||
dataLayout.setWidget(0, 2, closeButton);
|
||||
closeButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.CSV));
|
||||
}
|
||||
});
|
||||
|
||||
propertiesButton = new TextButton("Properties", TabularDataResources.INSTANCE.properties());
|
||||
propertiesButton.setToolTip("Properties");
|
||||
dataLayout.setWidget(1, 2, propertiesButton);
|
||||
propertiesButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
cleanCells(dataLayout.getElement());
|
||||
|
||||
|
||||
|
||||
//Import
|
||||
ButtonGroup importGroup = new ButtonGroup();
|
||||
importGroup.setHeight("78px");
|
||||
importGroup.setStyleName("margin:2px");
|
||||
importGroup.setHeadingText("Import");
|
||||
toolBar.add(importGroup);
|
||||
|
||||
FlexTable importLayout = new FlexTable();
|
||||
importGroup.add(importLayout);
|
||||
|
||||
importSDMXButton = new TextButton("SDMX", TabularDataResources.INSTANCE.sdmx32());
|
||||
importSDMXButton.setScale(ButtonScale.LARGE);
|
||||
importSDMXButton.setIconAlign(IconAlign.TOP);
|
||||
importSDMXButton.setToolTip("Import a new table from SDMX");
|
||||
importSDMXButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
importSDMXButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
eventBus.fireEvent(new ImportTableEvent(ImportTableType.SDMX));
|
||||
}
|
||||
});
|
||||
|
||||
importLayout.setWidget(0, 0, importSDMXButton);
|
||||
importLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
|
||||
importCSVButton = new TextButton("CSV", TabularDataResources.INSTANCE.csv());
|
||||
importCSVButton.setToolTip("Import a new table from CSV");
|
||||
importLayout.setWidget(0, 2, importCSVButton);
|
||||
importCSVButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
eventBus.fireEvent(new ImportTableEvent(ImportTableType.CSV));
|
||||
}
|
||||
});
|
||||
|
||||
importJSONButton = new TextButton("JSON", TabularDataResources.INSTANCE.json());
|
||||
importJSONButton.setToolTip("Import a new table from JSON");
|
||||
importLayout.setWidget(1, 2, importJSONButton);
|
||||
importJSONButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
cleanCells(importLayout.getElement());
|
||||
|
||||
|
||||
//Export
|
||||
ButtonGroup exportGroup = new ButtonGroup();
|
||||
exportGroup.setHeight("78px");
|
||||
exportGroup.setStyleName("margin:2px");
|
||||
exportGroup.setHeadingText("Export");
|
||||
toolBar.add(exportGroup);
|
||||
|
||||
FlexTable exportLayout = new FlexTable();
|
||||
exportGroup.add(exportLayout);
|
||||
|
||||
exportSDMXButton = new TextButton("SDMX", TabularDataResources.INSTANCE.sdmx32());
|
||||
exportSDMXButton.setScale(ButtonScale.LARGE);
|
||||
exportSDMXButton.setIconAlign(IconAlign.TOP);
|
||||
exportSDMXButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
|
||||
exportLayout.setWidget(0, 0, exportSDMXButton);
|
||||
exportLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
|
||||
exportCSVButton = new TextButton("CSV", TabularDataResources.INSTANCE.csv());
|
||||
exportLayout.setWidget(0, 2, exportCSVButton);
|
||||
|
||||
exportJSONButton = new TextButton("JSON", TabularDataResources.INSTANCE.json());
|
||||
exportLayout.setWidget(1, 2, exportJSONButton);
|
||||
|
||||
cleanCells(exportLayout.getElement());
|
||||
|
||||
}
|
||||
|
||||
protected void cleanCells(Element elem) {
|
||||
NodeList<Element> tds = elem.<XElement> cast().select("td");
|
||||
for (int i = 0; i < tds.getLength(); i++) {
|
||||
Element td = tds.getItem(i);
|
||||
|
||||
if (!td.hasChildNodes() && td.getClassName().equals("")) {
|
||||
td.removeFromParent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,223 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.td.client.ribbon;
|
||||
|
||||
import org.gcube.portlets.user.td.client.resource.TabularDataResources;
|
||||
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.dom.client.NodeList;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonArrowAlign;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonScale;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
||||
import com.sencha.gxt.core.client.dom.XElement;
|
||||
import com.sencha.gxt.widget.core.client.button.ButtonGroup;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
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"
|
||||
*
|
||||
*/
|
||||
public class FormulasToolBar {
|
||||
|
||||
protected EventBus eventBus;
|
||||
protected ToolBar toolBar;
|
||||
|
||||
//Basic
|
||||
protected TextButton filterButton;
|
||||
protected TextButton unionButton;
|
||||
protected TextButton denormalizeButton;
|
||||
protected TextButton groupButton;
|
||||
protected TextButton aggregateButton;
|
||||
|
||||
//History
|
||||
protected TextButton historyButton;
|
||||
protected TextButton discardButton;
|
||||
protected TextButton discardAllButton;
|
||||
|
||||
public FormulasToolBar(EventBus eventBus)
|
||||
{
|
||||
this.eventBus = eventBus;
|
||||
toolBar = new ToolBar();
|
||||
build();
|
||||
}
|
||||
|
||||
public ToolBar getToolBar()
|
||||
{
|
||||
return toolBar;
|
||||
}
|
||||
|
||||
protected void build()
|
||||
{
|
||||
toolBar.setHeight("94px");
|
||||
|
||||
//Basic
|
||||
ButtonGroup basicGroup = new ButtonGroup();
|
||||
basicGroup.setHeight("78px");
|
||||
basicGroup.setStyleName("margin:2px");
|
||||
basicGroup.setHeadingText("Basic");
|
||||
toolBar.add(basicGroup);
|
||||
|
||||
FlexTable basicLayout = new FlexTable();
|
||||
basicGroup.add(basicLayout);
|
||||
|
||||
filterButton = new TextButton("Filter", TabularDataResources.INSTANCE.filter32());
|
||||
filterButton.setScale(ButtonScale.LARGE);
|
||||
filterButton.setIconAlign(IconAlign.TOP);
|
||||
filterButton.setToolTip("Filter the open TS");
|
||||
filterButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
filterButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
basicLayout.setWidget(0, 0, filterButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
cleanCells(basicLayout.getElement());
|
||||
|
||||
unionButton = new TextButton("Union", TabularDataResources.INSTANCE.union32());
|
||||
unionButton.setScale(ButtonScale.LARGE);
|
||||
unionButton.setIconAlign(IconAlign.TOP);
|
||||
unionButton.setToolTip("Union the open TS with another one ");
|
||||
unionButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
unionButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
basicLayout.setWidget(0, 1, unionButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||
cleanCells(basicLayout.getElement());
|
||||
|
||||
denormalizeButton = new TextButton("Denormalize", TabularDataResources.INSTANCE.denormalize32());
|
||||
denormalizeButton.setScale(ButtonScale.LARGE);
|
||||
denormalizeButton.setIconAlign(IconAlign.TOP);
|
||||
denormalizeButton.setToolTip("Denormalize the open TS");
|
||||
denormalizeButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
denormalizeButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
basicLayout.setWidget(0, 2, denormalizeButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||
cleanCells(basicLayout.getElement());
|
||||
|
||||
|
||||
groupButton = new TextButton("Group", TabularDataResources.INSTANCE.group32());
|
||||
groupButton.setScale(ButtonScale.LARGE);
|
||||
groupButton.setIconAlign(IconAlign.TOP);
|
||||
groupButton.setToolTip("Group the open TS");
|
||||
groupButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
groupButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
basicLayout.setWidget(0, 3, groupButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 3, 2);
|
||||
cleanCells(basicLayout.getElement());
|
||||
|
||||
aggregateButton = new TextButton("Aggregate", TabularDataResources.INSTANCE.aggregate32());
|
||||
aggregateButton.setScale(ButtonScale.LARGE);
|
||||
aggregateButton.setIconAlign(IconAlign.TOP);
|
||||
aggregateButton.setToolTip("Aggregate the open TS");
|
||||
aggregateButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
aggregateButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
basicLayout.setWidget(0, 4, aggregateButton);
|
||||
basicLayout.getFlexCellFormatter().setRowSpan(0, 4, 2);
|
||||
cleanCells(basicLayout.getElement());
|
||||
|
||||
|
||||
//History
|
||||
ButtonGroup historyGroup = new ButtonGroup();
|
||||
historyGroup.setHeight("78px");
|
||||
historyGroup.setStyleName("margin:2px");
|
||||
historyGroup.setHeadingText("History");
|
||||
toolBar.add(historyGroup);
|
||||
|
||||
FlexTable historyLayout = new FlexTable();
|
||||
historyGroup.add(historyLayout);
|
||||
|
||||
historyButton = new TextButton("History", TabularDataResources.INSTANCE.history32());
|
||||
historyButton.setScale(ButtonScale.LARGE);
|
||||
historyButton.setIconAlign(IconAlign.TOP);
|
||||
historyButton.setToolTip("Show the current Time Series history");
|
||||
historyButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
historyButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
historyLayout.setWidget(0, 0, historyButton);
|
||||
historyLayout.getFlexCellFormatter().setRowSpan(0, 0, 2);
|
||||
cleanCells(historyLayout.getElement());
|
||||
|
||||
|
||||
|
||||
discardButton = new TextButton("Discard", TabularDataResources.INSTANCE.discard());
|
||||
discardButton.setToolTip("Discard the last operation");
|
||||
historyLayout.setWidget(0, 1, discardButton);
|
||||
discardButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.CSV));
|
||||
}
|
||||
});
|
||||
|
||||
discardAllButton = new TextButton("Discard All", TabularDataResources.INSTANCE.discardAll());
|
||||
discardAllButton.setToolTip("Discard all applied operations");
|
||||
historyLayout.setWidget(1, 1, discardAllButton);
|
||||
discardAllButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
//eventBus.fireEvent(new ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
cleanCells(historyLayout.getElement());
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void cleanCells(Element elem) {
|
||||
NodeList<Element> tds = elem.<XElement> cast().select("td");
|
||||
for (int i = 0; i < tds.getLength(); i++) {
|
||||
Element td = tds.getItem(i);
|
||||
|
||||
if (!td.hasChildNodes() && td.getClassName().equals("")) {
|
||||
td.removeFromParent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,159 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.td.client.ribbon;
|
||||
|
||||
import org.gcube.portlets.user.td.client.resource.TabularDataResources;
|
||||
|
||||
import com.google.gwt.dom.client.Element;
|
||||
import com.google.gwt.dom.client.NodeList;
|
||||
import com.google.gwt.user.client.ui.FlexTable;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonArrowAlign;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.ButtonScale;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
||||
import com.sencha.gxt.core.client.dom.XElement;
|
||||
import com.sencha.gxt.widget.core.client.button.ButtonGroup;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||
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"
|
||||
*
|
||||
*/
|
||||
public class ReviewToolBar {
|
||||
|
||||
protected EventBus eventBus;
|
||||
protected ToolBar toolBar;
|
||||
|
||||
protected TextButton btn;
|
||||
protected TextButton validationButton;
|
||||
protected TextButton rulesButton;
|
||||
protected TextButton statisticalButton;
|
||||
protected TextButton rstudioButton;
|
||||
|
||||
public ReviewToolBar(EventBus eventBus) {
|
||||
this.eventBus = eventBus;
|
||||
toolBar = new ToolBar();
|
||||
build();
|
||||
}
|
||||
|
||||
public ToolBar getToolBar() {
|
||||
return toolBar;
|
||||
}
|
||||
|
||||
protected void build() {
|
||||
toolBar.setHeight("94px");
|
||||
|
||||
// Validation
|
||||
ButtonGroup validationGroup = new ButtonGroup();
|
||||
validationGroup.setHeight("78px");
|
||||
validationGroup.setStyleName("margin:2px");
|
||||
validationGroup.setHeadingText("Validation");
|
||||
toolBar.add(validationGroup);
|
||||
|
||||
FlexTable validationLayout = new FlexTable();
|
||||
validationGroup.add(validationLayout);
|
||||
|
||||
rulesButton = new TextButton("Rules",
|
||||
TabularDataResources.INSTANCE.rules32());
|
||||
rulesButton.setScale(ButtonScale.LARGE);
|
||||
rulesButton.setIconAlign(IconAlign.TOP);
|
||||
rulesButton.setToolTip("Rules");
|
||||
rulesButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
rulesButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
// eventBus.fireEvent(new
|
||||
// ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
validationLayout.setWidget(0, 1, rulesButton);
|
||||
validationLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||
|
||||
validationButton = new TextButton("Validate",
|
||||
TabularDataResources.INSTANCE.validation32());
|
||||
validationButton.setScale(ButtonScale.LARGE);
|
||||
validationButton.setIconAlign(IconAlign.TOP);
|
||||
validationButton.setToolTip("Validate");
|
||||
validationButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
validationButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
// eventBus.fireEvent(new
|
||||
// ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
validationLayout.setWidget(0, 2, validationButton);
|
||||
validationLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||
|
||||
cleanCells(validationLayout.getElement());
|
||||
|
||||
ButtonGroup externalToolGroup = new ButtonGroup();
|
||||
externalToolGroup.setHeight("78px");
|
||||
externalToolGroup.setStyleName("margin:2px");
|
||||
externalToolGroup.setHeadingText("External Tools");
|
||||
toolBar.add(externalToolGroup);
|
||||
|
||||
FlexTable externalToolLayout = new FlexTable();
|
||||
externalToolGroup.add(externalToolLayout);
|
||||
|
||||
rstudioButton = new TextButton("R Studio",
|
||||
TabularDataResources.INSTANCE.rstudio32());
|
||||
rstudioButton.setScale(ButtonScale.LARGE);
|
||||
rstudioButton.setIconAlign(IconAlign.TOP);
|
||||
rstudioButton.setToolTip("R Studio");
|
||||
rstudioButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
rstudioButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
// eventBus.fireEvent(new
|
||||
// ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
externalToolLayout.setWidget(0, 1, rstudioButton);
|
||||
externalToolLayout.getFlexCellFormatter().setRowSpan(0, 1, 2);
|
||||
|
||||
statisticalButton = new TextButton("Statistical",
|
||||
TabularDataResources.INSTANCE.statistical32());
|
||||
statisticalButton.setScale(ButtonScale.LARGE);
|
||||
statisticalButton.setIconAlign(IconAlign.TOP);
|
||||
statisticalButton.setToolTip("Statistical");
|
||||
statisticalButton.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
statisticalButton.addSelectHandler(new SelectHandler() {
|
||||
|
||||
@Override
|
||||
public void onSelect(SelectEvent event) {
|
||||
// eventBus.fireEvent(new
|
||||
// ImportTableEvent(ImportTableType.JSON));
|
||||
}
|
||||
});
|
||||
|
||||
externalToolLayout.setWidget(0, 2, statisticalButton);
|
||||
externalToolLayout.getFlexCellFormatter().setRowSpan(0, 2, 2);
|
||||
|
||||
cleanCells(externalToolLayout.getElement());
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void cleanCells(Element elem) {
|
||||
NodeList<Element> tds = elem.<XElement> cast().select("td");
|
||||
for (int i = 0; i < tds.getLength(); i++) {
|
||||
Element td = tds.getItem(i);
|
||||
|
||||
if (!td.hasChildNodes() && td.getClassName().equals("")) {
|
||||
td.removeFromParent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.portlets.user.td.client.ribbon;
|
||||
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.widget.core.client.TabPanel;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||
|
||||
/**
|
||||
* @author "Federico De Faveri defaveri@isti.cnr.it"
|
||||
*
|
||||
*/
|
||||
public class TabularDataRibbon {
|
||||
|
||||
protected TabPanel ribbon;
|
||||
protected FileToolBar fileToolBar;
|
||||
protected ReviewToolBar reviewToolBar;
|
||||
protected FormulasToolBar formulasToolBar;
|
||||
protected ChartsToolBar chartsToolBar;
|
||||
|
||||
public TabularDataRibbon(EventBus eventBus)
|
||||
{
|
||||
ribbon = new TabPanel();
|
||||
ribbon.setId("Ribbon");
|
||||
ribbon.setStyleName("ribbon");
|
||||
fileToolBar = new FileToolBar(eventBus);
|
||||
VerticalLayoutContainer con = new VerticalLayoutContainer();
|
||||
con.setHeight("94px");
|
||||
con.add(fileToolBar.getToolBar(), new VerticalLayoutData(1, -1));
|
||||
ribbon.add(con, "File");
|
||||
|
||||
reviewToolBar = new ReviewToolBar(eventBus);
|
||||
con = new VerticalLayoutContainer();
|
||||
con.setHeight("94px");
|
||||
con.add(reviewToolBar.getToolBar(), new VerticalLayoutData(1, -1));
|
||||
ribbon.add(con, "Review");
|
||||
|
||||
formulasToolBar = new FormulasToolBar(eventBus);
|
||||
con = new VerticalLayoutContainer();
|
||||
con.setHeight("94px");
|
||||
con.add(formulasToolBar.getToolBar(), new VerticalLayoutData(1, -1));
|
||||
ribbon.add(con, "Formulas");
|
||||
|
||||
|
||||
chartsToolBar = new ChartsToolBar(eventBus);
|
||||
con = new VerticalLayoutContainer();
|
||||
con.setHeight("94px");
|
||||
con.add(chartsToolBar.getToolBar(), new VerticalLayoutData(1, -1));
|
||||
ribbon.add(con, "Charts");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the container
|
||||
*/
|
||||
public TabPanel getContainer() {
|
||||
return ribbon;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -7,7 +7,6 @@ import org.gcube.application.framework.core.session.ASLSession;
|
|||
import org.gcube.application.framework.core.session.SessionManager;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper;
|
||||
import org.gcube.portlets.user.sdmximportwizard.server.SessionUtil;
|
||||
import org.gcube.portlets.user.td.ciw.server.CSVTDImporter;
|
||||
import org.gcube.portlets.user.td.client.rpc.TabularDataService;
|
||||
import org.gcube.portlets.user.td.importer.server.TabularDataImporterManager;
|
||||
|
@ -21,7 +20,7 @@ import org.slf4j.*;
|
|||
@SuppressWarnings("serial")
|
||||
public class TabularDataServiceImpl extends RemoteServiceServlet implements TabularDataService {
|
||||
|
||||
protected static Logger logger = LoggerFactory.getLogger(SessionUtil.class);
|
||||
protected static Logger logger = LoggerFactory.getLogger(TabularDataServiceImpl.class);
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
<!-- Other module inherits -->
|
||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
||||
- <inherits name='org.gcube.portlets.user.workspace.WorkspaceTree' />
|
||||
<!-- <inherits name='org.gcube.portlets.user.workspace.WorkspaceTree' /> -->
|
||||
<inherits name="org.gcube.portlets.user.tdw.TabularDataWidget" />
|
||||
<inherits name='org.gcube.portlets.user.sdmximportwizard.sdmximportwizard' />
|
||||
<inherits name='org.gcube.portlets.user.sdmximportwizardtd.SDMXImportWizardTD' />
|
||||
<inherits name='org.gcube.portlets.user.td.open.TDOpen' />
|
||||
<inherits name='org.gcube.portlets.user.td.ciw.csvimporterwidget' />
|
||||
<!-- <inherits name='org.gcube.portlets.user.workspace.lighttree.WorkspacePortletLightTree' /> -->
|
||||
<inherits name='org.gcube.portlets.user.workspace.lighttree.WorkspacePortletLightTree' />
|
||||
|
||||
<!-- Specify the app entry point class. -->
|
||||
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
||||
|
|
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 927 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 470 B |
After Width: | Height: | Size: 937 B |
After Width: | Height: | Size: 612 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 792 B |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 659 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 736 B |
Before Width: | Height: | Size: 821 B |
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 906 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 482 B |
After Width: | Height: | Size: 886 B |
Before Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 864 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 921 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 470 B After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 818 B After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 920 B |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 837 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 888 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 894 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 891 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 788 B |
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1 +1,5 @@
|
|||
/** Add css rules here for your application. */
|
||||
.ribbon {
|
||||
height:127px;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
<!-- -->
|
||||
<!-- Consider inlining CSS to reduce the number of requested files -->
|
||||
<!-- -->
|
||||
<link type="text/css" rel="stylesheet" href="TabularDataPortlet.css">
|
||||
<link rel="stylesheet" type="text/css" href="tabulardataportlet/reset.css" />
|
||||
<link type="text/css" rel="stylesheet" href="TabularDataPortlet.css">
|
||||
|
||||
<!-- -->
|
||||
<!-- Any title is fine -->
|
||||
|
|
|
@ -23,11 +23,16 @@
|
|||
<servlet-class>org.gcube.portlets.user.tdw.server.TabularDataServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<!-- TDOpen -->
|
||||
<servlet>
|
||||
<servlet-name>TDOpenService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.td.open.server.TDOpenServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<!-- SDMX IMPORT WIZARD -->
|
||||
<servlet>
|
||||
<servlet-name>SDMXImportWizardServlet</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.sdmximportwizard.server.SDMXImportWizardServiceImpl</servlet-class>
|
||||
<load-on-startup>1</load-on-startup>
|
||||
<servlet-name>SDMXImportWizardService</servlet-name>
|
||||
<servlet-class>org.gcube.portlets.user.sdmximportwizardtd.server.SDMXImportWizardServiceImpl</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<!-- CSV IMPORT WIZARD -->
|
||||
|
@ -103,12 +108,22 @@
|
|||
<url-pattern>/tabulardataportlet/tdwdata</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- SDMX IMPORT WIZARD -->
|
||||
|
||||
<!-- TDOpen -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>SDMXImportWizardServlet</servlet-name>
|
||||
<servlet-name>TDOpenService</servlet-name>
|
||||
<url-pattern>/tabulardataportlet/TDOpenService</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
<!-- SDMX IMPORT WIZARD -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>SDMXImportWizardService</servlet-name>
|
||||
<url-pattern>/tabulardataportlet/SDMXImportWizardService</url-pattern>
|
||||
</servlet-mapping>
|
||||
<!-- <servlet-mapping> -->
|
||||
<!-- <servlet-name>SDMXImportWizardServlet</servlet-name> -->
|
||||
<!-- <url-pattern>/tabulardataportlet/SDMXImportWizardService</url-pattern> -->
|
||||
<!-- </servlet-mapping> -->
|
||||
|
||||
<!-- CSV IMPORT WIZARD -->
|
||||
<servlet-mapping>
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
|
||||
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.DevMode"/>
|
||||
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
|
||||
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="TabularDataPortlet.html"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/tabular-data-portlet"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
|
||||
<mapEntry key="GLOBUS_LOCATION" value="${GLOBUS_LOCATION}"/>
|
||||
</mapAttribute>
|
||||
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6" javaProject="tabular-data-portlet" path="1" type="4"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/tabular-data-portlet/src/main/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/tabular-data-portlet/src/main/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/tabular-data-portlet/src/test/java" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry internalArchive="/tabular-data-portlet/src/test/resources" path="3" type="2"/> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.variableClasspathEntry"> <memento path="3" variableString="${GLOBUS_LOCATION}"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry id="org.eclipse.jdt.launching.classpathentry.defaultClasspath"> <memento exportedEntriesOnly="false" project="tabular-data-portlet"/> </runtimeClasspathEntry> "/>
|
||||
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <runtimeClasspathEntry externalArchive="/home/giancarlo/gwt-2.4.0/gwt-dev.jar" path="3" type="2"/> "/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-war /home/giancarlo/workspace/tabular-data-portlet/target/tabular-data-portlet-1.0.0-SNAPSHOT -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -startupUrl TabularDataPortlet.html -logLevel INFO -codeServerPort 9997 -port 8888 org.gcube.portlets.user.td.TabularDataPortlet"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="tabular-data-portlet"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m -Dgwt.nowarn.legacy.tools"/>
|
||||
</launchConfiguration>
|