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 9a79736..131f571 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 @@ -5,6 +5,7 @@ import java.util.HashMap; import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync; import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource; import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData; +import org.gcube.portlets.user.td.informationwidget.client.resources.ResourceBundle; import org.gcube.portlets.user.td.informationwidget.client.util.InfoMessageBox; import org.gcube.portlets.user.td.metadatawidget.client.TRMetadataAccordionPanel; import org.gcube.portlets.user.td.metadatawidget.client.TableMetadataAccordionPanel; @@ -15,6 +16,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId; import com.allen_sauer.gwt.log.client.Log; import com.google.gwt.user.client.rpc.AsyncCallback; 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; import com.sencha.gxt.core.client.util.Margins; import com.sencha.gxt.widget.core.client.FramedPanel; @@ -121,6 +123,9 @@ public class TabularResourceProperties extends FramedPanel { // Save Button saveButton = new TextButton("Save"); + saveButton.setIcon(ResourceBundle.INSTANCE.save()); + saveButton.setIconAlign(IconAlign.RIGHT); + saveButton.setTitle("Save"); SelectHandler saveHandler = new SelectHandler() { public void onSelect(SelectEvent event) { @@ -133,7 +138,8 @@ public class TabularResourceProperties extends FramedPanel { new Margins(2))); vl.add(trFieldSet); - + + } protected void updateTabularResource(TabResource tabResource) { @@ -166,6 +172,10 @@ public class TabularResourceProperties extends FramedPanel { // Validation Button validationsButton = new TextButton("Validations"); + validationsButton.setIcon(ResourceBundle.INSTANCE.tableValidation()); + validationsButton.setIconAlign(IconAlign.RIGHT); + validationsButton.setTitle("Validations"); + SelectHandler validationsHandler = new SelectHandler() { public void onSelect(SelectEvent event) { @@ -241,7 +251,7 @@ public class TabularResourceProperties extends FramedPanel { public void onSuccess(TableData result) { updateTable(result); - Log.info("Retrived LastTable:" + result.getName()); + Log.debug("Retrived LastTable:" + result); } diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/ResourceBundle.java b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/ResourceBundle.java new file mode 100644 index 0000000..63ee2c8 --- /dev/null +++ b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/ResourceBundle.java @@ -0,0 +1,34 @@ +package org.gcube.portlets.user.td.informationwidget.client.resources; + + +import com.google.gwt.core.client.GWT; +import com.google.gwt.resources.client.ClientBundle; +import com.google.gwt.resources.client.ImageResource; + +/** + * Resource Bundle + * + * @author "Giancarlo Panichi" + * g.panichi@isti.cnr.it + * + */ +public interface ResourceBundle extends ClientBundle { + + public static final ResourceBundle INSTANCE=GWT.create(ResourceBundle.class); + + + @Source("disk.png") + ImageResource save(); + + @Source("disk_32.png") + ImageResource save32(); + + @Source("table-validation.png") + ImageResource tableValidation(); + + @Source("table-validation_32.png") + ImageResource tableValidation32(); + + + +} \ No newline at end of file diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/disk.png b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/disk.png new file mode 100644 index 0000000..9cce534 Binary files /dev/null and b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/disk.png differ diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/disk_32.png b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/disk_32.png new file mode 100644 index 0000000..fbb32bc Binary files /dev/null and b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/disk_32.png differ diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation.png b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation.png new file mode 100644 index 0000000..eee1001 Binary files /dev/null and b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation.png differ diff --git a/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation_32.png b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation_32.png new file mode 100644 index 0000000..c253439 Binary files /dev/null and b/src/main/java/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation_32.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/disk.png b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/disk.png new file mode 100644 index 0000000..9cce534 Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/disk.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/disk_32.png b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/disk_32.png new file mode 100644 index 0000000..fbb32bc Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/disk_32.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation.png b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation.png new file mode 100644 index 0000000..eee1001 Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation.png differ diff --git a/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation_32.png b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation_32.png new file mode 100644 index 0000000..c253439 Binary files /dev/null and b/src/main/resources/org/gcube/portlets/user/td/informationwidget/client/resources/table-validation_32.png differ