From 4a8075ce2a7005f01d1be425128e04ed58d5b7a3 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Wed, 18 Jun 2014 17:05:22 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@97527 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/TabularResourceProperties.java | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java index b40cf5f..778e91c 100644 --- a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java +++ b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/TabularResourceProperties.java @@ -28,8 +28,6 @@ import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.event.logical.shared.ValueChangeHandler; import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.user.client.ui.HasHorizontalAlignment; -import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.web.bindery.event.shared.EventBus; import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign; import com.sencha.gxt.core.client.dom.ScrollSupport.ScrollMode; @@ -72,6 +70,7 @@ public class TabularResourceProperties extends FramedPanel { protected TextField typeField; protected IconButton btnShare; + protected FieldLabel shareLabel; protected TRMetadataAccordionPanel trMetadataPanel; protected VerticalLayoutContainer layoutTabularResource; @@ -147,6 +146,8 @@ public class TabularResourceProperties extends FramedPanel { ownerField = new TextField(); ownerField.setReadOnly(true); ownerField.setValue(""); + layoutTabularResource.add(new FieldLabel(ownerField, "Owner"), + new VerticalLayoutData(1, -1)); btnShare = new IconButton(); btnShare.setIcon(ResourceBundle.INSTANCE.share()); @@ -158,17 +159,13 @@ public class TabularResourceProperties extends FramedPanel { } }); - btnShare.setVisible(false); + shareLabel = new FieldLabel(btnShare, "Share"); + shareLabel.setVisible(false); - HorizontalPanel hp = new HorizontalPanel(); - hp.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_LEFT); - hp.add(ownerField); - hp.add(btnShare); - FieldLabel ownerLabel = new FieldLabel(hp, "Owner"); - - layoutTabularResource.add(ownerLabel, + layoutTabularResource.add(shareLabel, new VerticalLayoutData(1, -1)); + finalizedField = new CheckBox(); // finalizedField.setBoxLabel(""); @@ -250,9 +247,9 @@ public class TabularResourceProperties extends FramedPanel { protected void updateShareInfo(ShareInfo result){ ArrayList contacts=result.getContacts(); if(contacts!=null&& contacts.size()>0){ - btnShare.setVisible(true); + shareLabel.setVisible(true); } else { - btnShare.setVisible(false); + shareLabel.setVisible(false); } }