From dff54ac88330ab3830014b39b61f726a3069505b Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 5 Dec 2014 11:05:19 +0000 Subject: [PATCH] Fixed Layout for GXT 3.1.1 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@101921 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../td/columnwidget/client/DeleteColumnPanel.java | 5 ++--- .../columnwidget/client/batch/ReplaceBatchPanel.java | 11 ++++++----- .../client/batch/SingleValueReplacePanel.java | 7 ++++--- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnPanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnPanel.java index 848e7ee..b86e4b4 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/DeleteColumnPanel.java @@ -31,7 +31,6 @@ import com.google.web.bindery.event.shared.EventBus; import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign; import com.sencha.gxt.core.client.IdentityValueProvider; import com.sencha.gxt.core.client.Style.SelectionMode; -import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode; import com.sencha.gxt.core.client.util.Margins; import com.sencha.gxt.data.client.loader.RpcProxy; import com.sencha.gxt.data.shared.ListStore; @@ -201,12 +200,12 @@ public class DeleteColumnPanel extends FramedPanel implements hBox.add(delete, new BoxLayoutData(new Margins(2, 5, 2, 5))); VerticalLayoutContainer v = new VerticalLayoutContainer(); - v.setScrollMode(ScrollMode.AUTO); + //v.setScrollMode(ScrollMode.AUTO); Set in GXT 3.0.1 v.add(columnsLabel, new VerticalLayoutData(-1, -1, new Margins(2, 1, 5, 1))); v.add(grid, new VerticalLayoutData(1, -1, new Margins(0))); v.add(hBox, new VerticalLayoutData(-1, -1, new Margins(10, 0, 10, 0))); - add(v, new VerticalLayoutData(-1, -1, new Margins(0))); + add(v, new VerticalLayoutData(1, -1, new Margins(0))); } diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java index 62843c7..4de9f1c 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/ReplaceBatchPanel.java @@ -437,15 +437,16 @@ public class ReplaceBatchPanel extends FramedPanel implements HBoxLayoutContainer flowButton = new HBoxLayoutContainer(); flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE); flowButton.setPack(BoxLayoutPack.CENTER); - - flowButton.add(btnSave, new BoxLayoutData(new Margins(2, 4, 2, 4))); - flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4))); + + BoxLayoutData boxLayoutData=new BoxLayoutData(new Margins(2, 4, 2, 4)); + flowButton.add(btnSave, boxLayoutData); + flowButton.add(btnClose, boxLayoutData); VerticalLayoutContainer v = new VerticalLayoutContainer(); v.add(toolBarHead, new VerticalLayoutData(1, -1, new Margins(0))); - v.add(grid, new VerticalLayoutData(-1, -1, new Margins(0))); + v.add(grid, new VerticalLayoutData(1, -1, new Margins(0))); v.add(toolBar, new VerticalLayoutData(1, 25, new Margins(0))); - v.add(flowButton, new VerticalLayoutData(-1, 36, + v.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2))); add(v); diff --git a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/SingleValueReplacePanel.java b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/SingleValueReplacePanel.java index 13b6ebf..3957740 100644 --- a/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/SingleValueReplacePanel.java +++ b/src/main/java/org/gcube/portlets/user/td/columnwidget/client/batch/SingleValueReplacePanel.java @@ -116,15 +116,16 @@ public class SingleValueReplacePanel extends FramedPanel { flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE); flowButton.setPack(BoxLayoutPack.CENTER); - flowButton.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4))); - flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4))); + BoxLayoutData boxLayoutData=new BoxLayoutData(new Margins(2, 4, 2, 4)); + flowButton.add(btnApply, boxLayoutData); + flowButton.add(btnClose, boxLayoutData); VerticalLayoutContainer v = new VerticalLayoutContainer(); v.add(new FieldLabel(valueField, "Value"), new VerticalLayoutData(1, -1)); v.add(new FieldLabel(replaceValueField, "Replace"), new VerticalLayoutData(1, -1)); - v.add(flowButton, new VerticalLayoutData(-1, 36, + v.add(flowButton, new VerticalLayoutData(1, 36, new Margins(5, 2, 5, 2))); add(v);