From a7824599823f728c840f2fc7f98d813efabd1b2a Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 7 Feb 2014 15:56:20 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@91131 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../ChangeColumnTypeProgressDialog.java | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/progress/ChangeColumnTypeProgressDialog.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/progress/ChangeColumnTypeProgressDialog.java index 74952e7..0184d6c 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/progress/ChangeColumnTypeProgressDialog.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/progress/ChangeColumnTypeProgressDialog.java @@ -6,13 +6,14 @@ import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableReque import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; import com.allen_sauer.gwt.log.client.Log; - import com.google.web.bindery.event.shared.EventBus; import com.sencha.gxt.core.client.util.Margins; +import com.sencha.gxt.widget.core.client.FramedPanel; import com.sencha.gxt.widget.core.client.ProgressBar; import com.sencha.gxt.widget.core.client.Window; import com.sencha.gxt.widget.core.client.button.TextButton; -import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData; +import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer; +import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData; import com.sencha.gxt.widget.core.client.event.SelectEvent; import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; @@ -27,8 +28,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler; */ public class ChangeColumnTypeProgressDialog extends Window implements ChangeColumnTypeProgressListener { public static final int STATUS_POLLING_DELAY = 1000; - protected String WIDTH = "650px"; - protected String HEIGHT = "530px"; + protected String WIDTH = "400px"; + protected String HEIGHT = "120px"; protected ChangeColumnTypeSession changeColumnTypeSession; protected EventBus eventBus; protected ChangeColumnTypeProgressUpdater progressUpdater; @@ -41,17 +42,22 @@ public class ChangeColumnTypeProgressDialog extends Window implements ChangeColu setWidth(WIDTH); setHeight(HEIGHT); setBodyBorder(false); - setResizable(false); + setResizable(true); setModal(true); setHeadingText("Change Column Type Progress"); trId=null; + FramedPanel panel=new FramedPanel(); + panel.setHeaderVisible(false); + panel.setBodyBorder(false); + + VerticalLayoutContainer v = new VerticalLayoutContainer(); + + ProgressBar progressBar = new ProgressBar(); - add(progressBar, new BoxLayoutData( - new Margins(10, 5, 10, 5))); - ok=new TextButton("Ok"); - ok.setVisible(false); + + ok=new TextButton("OK"); ok.addSelectHandler(new SelectHandler() { public void onSelect(SelectEvent event) { @@ -59,13 +65,22 @@ public class ChangeColumnTypeProgressDialog extends Window implements ChangeColu } }); - addButton(ok); - + + v.add(progressBar, new VerticalLayoutData(1, + 1, new Margins(5, 5, 5, 5))); + + panel.add(v); + panel.addButton(ok); + add(panel); + + progressUpdater = new ChangeColumnTypeProgressUpdater(); progressUpdater.addListener(new ChangeColumnTypeProgressBarUpdater(progressBar)); progressUpdater.addListener(this); + progressUpdater.scheduleRepeating(STATUS_POLLING_DELAY); show(); + ok.setVisible(false); }