From b3ff8e2c8d8bd454933340fef49a5710b06b874a Mon Sep 17 00:00:00 2001 From: Loredana Liccardo Date: Thu, 3 Jul 2014 13:16:56 +0000 Subject: [PATCH] mask added for sampling git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet@98366 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/panels/GxtBorderLayoutPanel.java | 8 +- .../toolbar/GxtToolbarFunctionality.java | 89 ++++++++++++------- 2 files changed, 63 insertions(+), 34 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/databasesmanager/client/panels/GxtBorderLayoutPanel.java b/src/main/java/org/gcube/portlets/user/databasesmanager/client/panels/GxtBorderLayoutPanel.java index 8a56758..5ea9e08 100644 --- a/src/main/java/org/gcube/portlets/user/databasesmanager/client/panels/GxtBorderLayoutPanel.java +++ b/src/main/java/org/gcube/portlets/user/databasesmanager/client/panels/GxtBorderLayoutPanel.java @@ -508,7 +508,7 @@ public class GxtBorderLayoutPanel extends ContentPanel { private void sample() { -// this.mask(); + this.mask("Loading", "x-mask-loading"); // System.out.println("Start RPC - submitQuery"); @@ -611,7 +611,9 @@ public class GxtBorderLayoutPanel extends ContentPanel { // start the parsing of the submit result in order to obtain a table private void parseResult(List result) { - + if (this.isMasked()){ + this.unmask(); + } RPCservice.parseCVSString(result, listAttributes, new AsyncCallback>() { @@ -648,7 +650,7 @@ public class GxtBorderLayoutPanel extends ContentPanel { } - + // else { diff --git a/src/main/java/org/gcube/portlets/user/databasesmanager/client/toolbar/GxtToolbarFunctionality.java b/src/main/java/org/gcube/portlets/user/databasesmanager/client/toolbar/GxtToolbarFunctionality.java index 033a2a1..7c3038e 100644 --- a/src/main/java/org/gcube/portlets/user/databasesmanager/client/toolbar/GxtToolbarFunctionality.java +++ b/src/main/java/org/gcube/portlets/user/databasesmanager/client/toolbar/GxtToolbarFunctionality.java @@ -1,7 +1,5 @@ package org.gcube.portlets.user.databasesmanager.client.toolbar; - - import java.util.logging.Level; import java.util.logging.Logger; @@ -30,7 +28,8 @@ import com.extjs.gxt.ui.client.widget.layout.FitLayout; import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem; import com.extjs.gxt.ui.client.widget.toolbar.ToolBar; import com.google.gwt.event.shared.HandlerManager; - +import com.extjs.gxt.ui.client.event.MessageBoxEvent; +import com.extjs.gxt.ui.client.event.Listener; public class GxtToolbarFunctionality { @@ -48,8 +47,9 @@ public class GxtToolbarFunctionality { private ToolBar toolBar; // the dialog that contains the form -// private Dialog dialog = new Dialog(); + // private Dialog dialog = new Dialog(); private Dialog dialog; + private MessageBox sample; // RPC service private GWTdbManagerServiceAsync RPCservice = null; @@ -212,7 +212,34 @@ public class GxtToolbarFunctionality { public void componentSelected(ButtonEvent ce) { // TODO Auto-generated method stub - +// Listener l = new Listener() { +// +// @Override +// public void handleEvent(MessageBoxEvent be) { +// // TODO Auto-generated method stub +// +// Button btn = ce.getButton(); +// +// if (btn.getText().equals("Yes")) +// { +// +// //fire event +// +// eventBus.fireEvent(new SamplingEvent()); +// +// } +// +// +// +// } +// }; +// +// +// sample = new MessageBox(); +// +// sample.confirm("Confirm", "Are you sure you want to perform the sampling", l); +// + //fire event eventBus.fireEvent(new SamplingEvent()); @@ -257,19 +284,19 @@ public class GxtToolbarFunctionality { // System.out.println("simple sample event"); - Dialog d = new Dialog(); - d.setHeading("Smart Sample"); - - // d.setBodyStyle("fontWeight:bold;padding:13px;"); - - d.setBodyStyle("padding:9px;"); - d.setSize(600, 400); - d.setScrollMode(Scroll.AUTO); - d.setHideOnButtonClick(true); - d.setModal(true); - d.setMaximizable(true); - d.addText("Result Table 2"); - d.show(); +// Dialog d = new Dialog(); +// d.setHeading("Smart Sample"); +// +// // d.setBodyStyle("fontWeight:bold;padding:13px;"); +// +// d.setBodyStyle("padding:9px;"); +// d.setSize(600, 400); +// d.setScrollMode(Scroll.AUTO); +// d.setHideOnButtonClick(true); +// d.setModal(true); +// d.setMaximizable(true); +// d.addText("Result Table 2"); +// d.show(); } @@ -289,19 +316,19 @@ public class GxtToolbarFunctionality { // System.out.println("simple sample event"); - Dialog d = new Dialog(); - d.setHeading("Random Sample"); - - // d.setBodyStyle("fontWeight:bold;padding:13px;"); - - d.setBodyStyle("padding:9px;"); - d.setSize(600, 400); - d.setScrollMode(Scroll.AUTO); - d.setHideOnButtonClick(true); - d.setModal(true); - d.setMaximizable(true); - d.addText("Result Table 3"); - d.show(); +// Dialog d = new Dialog(); +// d.setHeading("Random Sample"); +// +// // d.setBodyStyle("fontWeight:bold;padding:13px;"); +// +// d.setBodyStyle("padding:9px;"); +// d.setSize(600, 400); +// d.setScrollMode(Scroll.AUTO); +// d.setHideOnButtonClick(true); +// d.setModal(true); +// d.setMaximizable(true); +// d.addText("Result Table 3"); +// d.show(); }