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
This commit is contained in:
Giancarlo Panichi 2014-06-18 17:05:22 +00:00
parent 88ab9321bb
commit 4a8075ce2a
1 changed files with 9 additions and 12 deletions

View File

@ -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> contacts=result.getContacts();
if(contacts!=null&& contacts.size()>0){
btnShare.setVisible(true);
shareLabel.setVisible(true);
} else {
btnShare.setVisible(false);
shareLabel.setVisible(false);
}
}