Added Resources Button

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@100518 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-10-08 10:48:31 +00:00
parent 980bbe19fb
commit dd986d75c7
6 changed files with 38 additions and 2 deletions

View File

@ -103,7 +103,8 @@ public class TabularResourceProperties extends FramedPanel {
protected VerticalLayoutContainer layoutTable;
protected TextButton saveButton;
protected TextButton validationsButton;
protected TextButton resourcesButton;
protected ArrayList<LicenceData> licencesList;
public TabularResourceProperties(String name, EventBus eventBus) {
@ -266,10 +267,27 @@ public class TabularResourceProperties extends FramedPanel {
};
validationsButton.addSelectHandler(validationsHandler);
// Resources Button
resourcesButton = new TextButton("Resources");
resourcesButton.setIcon(ResourceBundle.INSTANCE.resources());
resourcesButton.setIconAlign(IconAlign.RIGHT);
resourcesButton.setTitle("Resources");
SelectHandler resourcesHandler = new SelectHandler() {
public void onSelect(SelectEvent event) {
openResources();
}
};
resourcesButton.addSelectHandler(resourcesHandler);
//
HBoxLayoutContainer hBox = new HBoxLayoutContainer();
hBox.add(saveButton, new BoxLayoutData(new Margins(2, 5, 2, 5)));
hBox.add(validationsButton, new BoxLayoutData(new Margins(2, 5, 2, 5)));
hBox.add(resourcesButton, new BoxLayoutData(new Margins(2, 5, 2, 5)));
layoutTabularResource.add(hBox, new VerticalLayoutData(-1, -1,
new Margins(2)));
@ -420,6 +438,19 @@ public class TabularResourceProperties extends FramedPanel {
Log.error("TRId is null");
}
}
protected void openResources() {
Log.debug("Request Resources Tab");
if (trId != null) {
WidgetRequestEvent e = new WidgetRequestEvent(
WidgetRequestType.RESOURCESPANEL);
e.setTrId(trId);
eventBus.fireEvent(e);
} else {
Log.error("TRId is null");
}
}
protected void updateTable(TableData tableData) {
trId = tableData.getTrId();

View File

@ -35,6 +35,11 @@ public interface ResourceBundle extends ClientBundle {
@Source("page-white-share_32.png")
ImageResource share32();
@Source("resources.png")
ImageResource resources();
@Source("resources_32.png")
ImageResource resources32();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB