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:
parent
980bbe19fb
commit
dd986d75c7
|
@ -103,6 +103,7 @@ public class TabularResourceProperties extends FramedPanel {
|
||||||
protected VerticalLayoutContainer layoutTable;
|
protected VerticalLayoutContainer layoutTable;
|
||||||
protected TextButton saveButton;
|
protected TextButton saveButton;
|
||||||
protected TextButton validationsButton;
|
protected TextButton validationsButton;
|
||||||
|
protected TextButton resourcesButton;
|
||||||
|
|
||||||
protected ArrayList<LicenceData> licencesList;
|
protected ArrayList<LicenceData> licencesList;
|
||||||
|
|
||||||
|
@ -266,9 +267,26 @@ public class TabularResourceProperties extends FramedPanel {
|
||||||
};
|
};
|
||||||
validationsButton.addSelectHandler(validationsHandler);
|
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();
|
HBoxLayoutContainer hBox = new HBoxLayoutContainer();
|
||||||
hBox.add(saveButton, new BoxLayoutData(new Margins(2, 5, 2, 5)));
|
hBox.add(saveButton, new BoxLayoutData(new Margins(2, 5, 2, 5)));
|
||||||
hBox.add(validationsButton, 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,
|
layoutTabularResource.add(hBox, new VerticalLayoutData(-1, -1,
|
||||||
new Margins(2)));
|
new Margins(2)));
|
||||||
|
@ -421,6 +439,19 @@ public class TabularResourceProperties extends FramedPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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) {
|
protected void updateTable(TableData tableData) {
|
||||||
trId = tableData.getTrId();
|
trId = tableData.getTrId();
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -35,6 +35,11 @@ public interface ResourceBundle extends ClientBundle {
|
||||||
@Source("page-white-share_32.png")
|
@Source("page-white-share_32.png")
|
||||||
ImageResource share32();
|
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 |
Loading…
Reference in New Issue