ref 6078:TDM - Create a new widget to support operations's invocation on DataMiner

https://support.d4science.org/issues/6078

Updated to support DataMiner

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/data-miner-manager-widget@146283 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2017-03-22 17:45:04 +00:00
parent 930909e538
commit 86ffebda02
2 changed files with 16 additions and 6 deletions

View File

@ -129,11 +129,11 @@ public class TabItem extends HBoxLayoutContainer {
useTabularResource(); useTabularResource();
} }
}); });
selectTRButton2.setIcon(DataMinerManagerPanel.resources selectTRButton2.setIcon(DataMinerManagerPanel.resources
.tabularResource()); .tabularResource());
selectTRButton2.setToolTip("Use Tabular Resource"); selectTRButton2.setToolTip("Use Tabular Resource");
selectButton = new TextButton("Select Data Set"); selectButton = new TextButton("Select Data Set");
selectButton.addSelectHandler(new SelectEvent.SelectHandler() { selectButton.addSelectHandler(new SelectEvent.SelectHandler() {
@ -156,7 +156,6 @@ public class TabItem extends HBoxLayoutContainer {
wselectDialog.show(); wselectDialog.show();
} }
}); });
selectButton2.setVisible(false);
downloadButton = new TextButton(""); downloadButton = new TextButton("");
downloadButton.setIcon(DataMinerManagerPanel.resources.download()); downloadButton.setIcon(DataMinerManagerPanel.resources.download());
@ -167,7 +166,8 @@ public class TabItem extends HBoxLayoutContainer {
downloadFile(); downloadFile();
} }
}); });
downloadButton.setVisible(false); downloadButton.setToolTip("Download Data Set");
addBtn = new TextButton(""); addBtn = new TextButton("");
addBtn.setIcon(DataMinerManagerPanel.resources.add()); addBtn.setIcon(DataMinerManagerPanel.resources.add());
@ -191,7 +191,7 @@ public class TabItem extends HBoxLayoutContainer {
} }
}); });
removeBtn.setVisible(!first);
setPack(BoxLayoutPack.START); setPack(BoxLayoutPack.START);
setEnableOverflow(false); setEnableOverflow(false);
@ -205,6 +205,11 @@ public class TabItem extends HBoxLayoutContainer {
add(addBtn, new BoxLayoutData(new Margins())); add(addBtn, new BoxLayoutData(new Margins()));
add(removeBtn, new BoxLayoutData(new Margins())); add(removeBtn, new BoxLayoutData(new Margins()));
selectTRButton2.setVisible(false);
selectButton2.setVisible(false);
downloadButton.setVisible(false);
removeBtn.setVisible(!first);
forceLayout(); forceLayout();
} }

View File

@ -320,6 +320,9 @@ public class TabularFld extends AbstractFld implements
} }
}); });
cancelButton.setToolTip("Cancel");
downloadButton = new TextButton(""); downloadButton = new TextButton("");
downloadButton.setIcon(DataMinerManagerPanel.resources.download()); downloadButton.setIcon(DataMinerManagerPanel.resources.download());
downloadButton.addSelectHandler(new SelectEvent.SelectHandler() { downloadButton.addSelectHandler(new SelectEvent.SelectHandler() {
@ -329,6 +332,8 @@ public class TabularFld extends AbstractFld implements
downloadFile(); downloadFile();
} }
}); });
downloadButton.setToolTip("Download Data Set");
} catch (Throwable e) { } catch (Throwable e) {
Log.error("TabularField init: " + e.getLocalizedMessage()); Log.error("TabularField init: " + e.getLocalizedMessage());
e.printStackTrace(); e.printStackTrace();