diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 3b12138..c826c2b 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -4,9 +4,6 @@ - - uses - diff --git a/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java b/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java index 82cc711..144646f 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java +++ b/src/main/java/org/gcube/portlets/user/td/client/TabularDataPortlet.java @@ -14,9 +14,6 @@ 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.event.logical.shared.ResizeEvent; -import com.google.gwt.event.logical.shared.ResizeHandler; -import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; import com.google.web.bindery.event.shared.EventBus; @@ -54,7 +51,7 @@ public class TabularDataPortlet implements EntryPoint { private final TabularDataServiceAsync greetingService = GWT.create(TabularDataService.class); //Main Panel - private static SimpleContainer mainPanel; + private static BorderLayoutContainer mainPanelLayout; //Private TabularData private static TabularData tabularData; @@ -86,7 +83,7 @@ public class TabularDataPortlet implements EntryPoint { /** * Update window size - */ + public void updateSize(){ RootPanel workspace = RootPanel.get("tdp"); @@ -106,16 +103,16 @@ public class TabularDataPortlet implements EntryPoint { System.out.println("New workspace dimension Height: "+rootHeight+" Width: "+rootWidth); - mainPanel.setHeight(rootHeight); - mainPanel.setWidth(rootWidth); + mainPanelLayout.setHeight(rootHeight); + mainPanelLayout.setWidth(rootWidth); } - +*/ protected void loadMainPanel() { - + /* Window.addResizeHandler(new ResizeHandler() { @Override @@ -125,7 +122,7 @@ public class TabularDataPortlet implements EntryPoint { } }); - + */ @@ -145,8 +142,11 @@ public class TabularDataPortlet implements EntryPoint { //Layout - final BorderLayoutContainer mainPanelLayout = new BorderLayoutContainer(); + mainPanelLayout = new BorderLayoutContainer(); mainPanelLayout.setBorders(true); + mainPanelLayout.setWidth("100%"); + mainPanelLayout.setHeight("100%"); + //Ribbon Menu TabularDataRibbon tabularDataTooBar = new TabularDataRibbon(eventBus); @@ -190,21 +190,25 @@ public class TabularDataPortlet implements EntryPoint { eastData.setCollapseHidden(true); mainPanelLayout.setEastWidget(functionalityPanel,eastData); - functionalityPanel.collapse(); functionalityPanel.disable(); - mainPanelLayout.onResize(); - + controller.setFunctionalityTab(functionalityTab); controller.setFunctionalityPanel(functionalityPanel); controller.setEastData(eastData); + + //Main - mainPanel = new SimpleContainer(); - mainPanel.add(mainPanelLayout); - updateSize(); - bind(mainPanel); + //SimpleContainer mainPanel = new SimpleContainer(); + //mainPanelLayout.clearSizeCache(); + //mainPanelLayout.forceLayout(); + //mainPanel.add(mainPanelLayout); + + //updateSize(); + bind(mainPanelLayout); + } @@ -215,6 +219,7 @@ public class TabularDataPortlet implements EntryPoint { Log.trace("Div with id "+JSP_TAG_ID+" not found, starting in dev mode"); Viewport viewport = new Viewport(); viewport.setWidget(mainWidget); + viewport.onResize(); RootPanel.get().add(viewport); } else { Log.trace("Application div with id "+JSP_TAG_ID+" found, starting in portal mode"); @@ -222,6 +227,7 @@ public class TabularDataPortlet implements EntryPoint { //viewport.setEnableScroll(true); viewport.setWidget(mainWidget); //RootPanel.get() + viewport.onResize(); root.add(viewport); } } diff --git a/src/main/java/org/gcube/portlets/user/td/client/resource/TabularDataResources.java b/src/main/java/org/gcube/portlets/user/td/client/resource/TabularDataResources.java index 936566c..382b505 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/resource/TabularDataResources.java +++ b/src/main/java/org/gcube/portlets/user/td/client/resource/TabularDataResources.java @@ -167,5 +167,24 @@ public interface TabularDataResources extends ClientBundle { @Source("column.png") ImageResource column(); + @Source("cog_32.png") + ImageResource cog32(); + + @Source("cog.png") + ImageResource cog(); + + @Source("delete_32.png") + ImageResource delete32(); + + @Source("delete.png") + ImageResource delete(); + + @Source("rule-add_32.png") + ImageResource ruleadd32(); + + @Source("rule-add.png") + ImageResource ruleadd(); + + } diff --git a/src/main/java/org/gcube/portlets/user/td/client/ribbon/ChartsToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/ribbon/ChartsToolBar.java index e40cab0..a6ebc5c 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/ribbon/ChartsToolBar.java +++ b/src/main/java/org/gcube/portlets/user/td/client/ribbon/ChartsToolBar.java @@ -134,15 +134,15 @@ public class ChartsToolBar { cleanCells(basicLayout.getElement()); - //GIS - ButtonGroup gisGroup = new ButtonGroup(); - gisGroup.setHeight("78px"); - gisGroup.setStyleName("margin:2px"); - gisGroup.setHeadingText("GIS"); - toolBar.add(gisGroup); + //External Tools + ButtonGroup externalToolGroup = new ButtonGroup(); + externalToolGroup.setHeight("78px"); + externalToolGroup.setStyleName("margin:2px"); + externalToolGroup.setHeadingText("External Tools"); + toolBar.add(externalToolGroup); - FlexTable gisLayout = new FlexTable(); - gisGroup.add(gisLayout); + FlexTable externalToolLayout = new FlexTable(); + externalToolGroup.add(externalToolLayout); gisButton = new TextButton("GIS", TabularDataResources.INSTANCE.gis32()); gisButton.setScale(ButtonScale.LARGE); @@ -157,21 +157,11 @@ public class ChartsToolBar { } }); - gisLayout.setWidget(0, 0, gisButton); - gisLayout.getFlexCellFormatter().setRowSpan(0, 0, 2); - - cleanCells(gisLayout.getElement()); + externalToolLayout.setWidget(0, 0, gisButton); + externalToolLayout.getFlexCellFormatter().setRowSpan(0, 0, 2); + - 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); diff --git a/src/main/java/org/gcube/portlets/user/td/client/ribbon/ReviewToolBar.java b/src/main/java/org/gcube/portlets/user/td/client/ribbon/ReviewToolBar.java index 58a7fbb..14ed5e9 100644 --- a/src/main/java/org/gcube/portlets/user/td/client/ribbon/ReviewToolBar.java +++ b/src/main/java/org/gcube/portlets/user/td/client/ribbon/ReviewToolBar.java @@ -58,7 +58,7 @@ public class ReviewToolBar { validationGroup.add(validationLayout); rulesButton = new TextButton("New Rule", - TabularDataResources.INSTANCE.rules32()); + TabularDataResources.INSTANCE.ruleadd32()); rulesButton.setScale(ButtonScale.LARGE); rulesButton.setIconAlign(IconAlign.TOP); rulesButton.setToolTip("Define a new validation rule"); @@ -125,7 +125,7 @@ public class ReviewToolBar { operationsGroup.add(operationsLayout); operationsButton = new TextButton("Review Operations", - TabularDataResources.INSTANCE.rules32()); + TabularDataResources.INSTANCE.cog32()); operationsButton.setScale(ButtonScale.LARGE); operationsButton.setIconAlign(IconAlign.TOP); operationsButton.setToolTip("View performed operations"); diff --git a/src/main/java/org/gcube/portlets/user/td/server/TabularDataServiceImpl.java b/src/main/java/org/gcube/portlets/user/td/server/TabularDataServiceImpl.java index 1c6b4f1..65b63d3 100644 --- a/src/main/java/org/gcube/portlets/user/td/server/TabularDataServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/td/server/TabularDataServiceImpl.java @@ -9,6 +9,7 @@ import org.gcube.common.scope.api.ScopeProvider; import org.gcube.portal.custom.scopemanager.scopehelper.ScopeHelper; import org.gcube.portlets.user.td.ciw.server.CSVTDImporter; import org.gcube.portlets.user.td.client.rpc.TabularDataService; +import org.gcube.portlets.user.td.gxtservice.shared.Constants; import org.gcube.portlets.user.td.importer.server.TabularDataImporterManager; import org.gcube.portlets.user.tdw.datasource.td.TDDataSourceFactory; import org.gcube.portlets.user.tdw.server.datasource.DataSourceFactoryRegistry; @@ -41,7 +42,7 @@ public class TabularDataServiceImpl extends RemoteServiceServlet implements Tabu //CSVTargetRegistry.getInstance().add(new DemoCSVTarget()); //System.out.println("Registered DemoCSVTarget"); - ScopeProvider.instance.set("/gcube/devsec"); + //ScopeProvider.instance.get(); System.out.println("initializing TDDataSourceFactory"); DataSourceFactoryRegistry.getInstance().add(new TDDataSourceFactory()); @@ -54,8 +55,8 @@ public class TabularDataServiceImpl extends RemoteServiceServlet implements Tabu if (username == null) { logger.warn("no user found in session, using test one"); - username = "giancarlo.panichi"; - String scope = "/gcube/devsec"; + username = Constants.DEFAULT_USER; + String scope = Constants.DEFAULT_SCOPE; httpSession.setAttribute(ScopeHelper.USERNAME_ATTRIBUTE, username); ASLSession session = SessionManager.getInstance().getASLSession(httpSession.getId(), username); diff --git a/src/main/resources/org/gcube/portlets/user/td/client/resource/column-values.png b/src/main/resources/org/gcube/portlets/user/td/client/resource/column-values.png index f1dfcb9..6bcde1c 100644 Binary files a/src/main/resources/org/gcube/portlets/user/td/client/resource/column-values.png and b/src/main/resources/org/gcube/portlets/user/td/client/resource/column-values.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/client/resource/column-values_32.png b/src/main/resources/org/gcube/portlets/user/td/client/resource/column-values_32.png index 4a05a15..a493b99 100644 Binary files a/src/main/resources/org/gcube/portlets/user/td/client/resource/column-values_32.png and b/src/main/resources/org/gcube/portlets/user/td/client/resource/column-values_32.png differ diff --git a/src/main/webapp/TabularDataPortlet.html b/src/main/webapp/TabularDataPortlet.html index 1441c3f..8f649fd 100644 --- a/src/main/webapp/TabularDataPortlet.html +++ b/src/main/webapp/TabularDataPortlet.html @@ -42,8 +42,8 @@ in order for this application to display correctly. -
-
+