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
This commit is contained in:
Loredana Liccardo 2014-07-03 13:16:56 +00:00
parent e2c1826227
commit b3ff8e2c8d
2 changed files with 63 additions and 34 deletions

View File

@ -508,7 +508,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
private void sample() { private void sample() {
// this.mask(); this.mask("Loading", "x-mask-loading");
// System.out.println("Start RPC - submitQuery"); // 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 // start the parsing of the submit result in order to obtain a table
private void parseResult(List<Result> result) { private void parseResult(List<Result> result) {
if (this.isMasked()){
this.unmask();
}
RPCservice.parseCVSString(result, listAttributes, RPCservice.parseCVSString(result, listAttributes,
new AsyncCallback<List<Row>>() { new AsyncCallback<List<Row>>() {
@ -648,7 +650,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
} }
// else { // else {

View File

@ -1,7 +1,5 @@
package org.gcube.portlets.user.databasesmanager.client.toolbar; package org.gcube.portlets.user.databasesmanager.client.toolbar;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; 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.SeparatorToolItem;
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar; import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
import com.google.gwt.event.shared.HandlerManager; 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 { public class GxtToolbarFunctionality {
@ -48,8 +47,9 @@ public class GxtToolbarFunctionality {
private ToolBar toolBar; private ToolBar toolBar;
// the dialog that contains the form // the dialog that contains the form
// private Dialog dialog = new Dialog(); // private Dialog dialog = new Dialog();
private Dialog dialog; private Dialog dialog;
private MessageBox sample;
// RPC service // RPC service
private GWTdbManagerServiceAsync RPCservice = null; private GWTdbManagerServiceAsync RPCservice = null;
@ -212,7 +212,34 @@ public class GxtToolbarFunctionality {
public void componentSelected(ButtonEvent ce) { public void componentSelected(ButtonEvent ce) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// Listener<MessageBoxEvent> l = new Listener<MessageBoxEvent>() {
//
// @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 //fire event
eventBus.fireEvent(new SamplingEvent()); eventBus.fireEvent(new SamplingEvent());
@ -257,19 +284,19 @@ public class GxtToolbarFunctionality {
// System.out.println("simple sample event"); // System.out.println("simple sample event");
Dialog d = new Dialog(); // Dialog d = new Dialog();
d.setHeading("Smart Sample"); // d.setHeading("Smart Sample");
//
// d.setBodyStyle("fontWeight:bold;padding:13px;"); // // d.setBodyStyle("fontWeight:bold;padding:13px;");
//
d.setBodyStyle("padding:9px;"); // d.setBodyStyle("padding:9px;");
d.setSize(600, 400); // d.setSize(600, 400);
d.setScrollMode(Scroll.AUTO); // d.setScrollMode(Scroll.AUTO);
d.setHideOnButtonClick(true); // d.setHideOnButtonClick(true);
d.setModal(true); // d.setModal(true);
d.setMaximizable(true); // d.setMaximizable(true);
d.addText("Result Table 2"); // d.addText("Result Table 2");
d.show(); // d.show();
} }
@ -289,19 +316,19 @@ public class GxtToolbarFunctionality {
// System.out.println("simple sample event"); // System.out.println("simple sample event");
Dialog d = new Dialog(); // Dialog d = new Dialog();
d.setHeading("Random Sample"); // d.setHeading("Random Sample");
//
// d.setBodyStyle("fontWeight:bold;padding:13px;"); // // d.setBodyStyle("fontWeight:bold;padding:13px;");
//
d.setBodyStyle("padding:9px;"); // d.setBodyStyle("padding:9px;");
d.setSize(600, 400); // d.setSize(600, 400);
d.setScrollMode(Scroll.AUTO); // d.setScrollMode(Scroll.AUTO);
d.setHideOnButtonClick(true); // d.setHideOnButtonClick(true);
d.setModal(true); // d.setModal(true);
d.setMaximizable(true); // d.setMaximizable(true);
d.addText("Result Table 3"); // d.addText("Result Table 3");
d.show(); // d.show();
} }