256: Workspace explorer
Task-Url: https://support.d4science.org/issues/256 Updated dialog git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/workspace-explorer@117088 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
57095ffc19
commit
4f7a6ee837
|
@ -12,6 +12,8 @@ public class WorkspaceExplorerConstants {
|
||||||
|
|
||||||
public static final String WORKSPACE_EXPLORER_CAPTION = "Workspace Explorer";
|
public static final String WORKSPACE_EXPLORER_CAPTION = "Workspace Explorer";
|
||||||
|
|
||||||
|
public static final String WORKSPACE_EXPLORER_SAVE_AS_CAPTION = "Workspace Explorer Save As...";
|
||||||
|
|
||||||
public static final String HOME_LABEL = "Home";
|
public static final String HOME_LABEL = "Home";
|
||||||
|
|
||||||
public static final String WORKSPACE_MY_SPECIAL_FOLDERS_PATH = "/Workspace/MySpecialFolders";
|
public static final String WORKSPACE_MY_SPECIAL_FOLDERS_PATH = "/Workspace/MySpecialFolders";
|
||||||
|
|
|
@ -99,6 +99,25 @@ public class WorkspaceExplorerSaveDialog extends Modal implements HasWorskpaceEx
|
||||||
WorkspaceExplorerController.eventBus.fireEvent(new LoadRootEvent());
|
WorkspaceExplorerController.eventBus.fireEvent(new LoadRootEvent());
|
||||||
initDialog(captionTxt, fileName);
|
initDialog(captionTxt, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Instantiates a new workspace explorer save dialog.
|
||||||
|
*
|
||||||
|
* @param fileName the file name
|
||||||
|
* @param showableTypes the showable types
|
||||||
|
*/
|
||||||
|
public WorkspaceExplorerSaveDialog(String fileName, List<ItemType> showableTypes) {
|
||||||
|
|
||||||
|
if (showableTypes != null) {
|
||||||
|
ItemType[] itemsType = new ItemType[showableTypes.size()];
|
||||||
|
itemsType = showableTypes.toArray(itemsType);
|
||||||
|
setShowableTypes(showableTypes.toArray(itemsType));
|
||||||
|
}
|
||||||
|
|
||||||
|
WorkspaceExplorerController.eventBus.fireEvent(new LoadRootEvent());
|
||||||
|
initDialog(captionTxt, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -108,7 +127,7 @@ public class WorkspaceExplorerSaveDialog extends Modal implements HasWorskpaceEx
|
||||||
* @param fileName the file name
|
* @param fileName the file name
|
||||||
*/
|
*/
|
||||||
private void initDialog(String captionTxt, String fileName) {
|
private void initDialog(String captionTxt, String fileName) {
|
||||||
this.captionTxt = (captionTxt == null || captionTxt.isEmpty()) ? WorkspaceExplorerConstants.WORKSPACE_EXPLORER_CAPTION: captionTxt;
|
this.captionTxt = (captionTxt == null || captionTxt.isEmpty()) ? WorkspaceExplorerConstants.WORKSPACE_EXPLORER_SAVE_AS_CAPTION: captionTxt;
|
||||||
setAnimation(false);
|
setAnimation(false);
|
||||||
setCloseVisible(true);
|
setCloseVisible(true);
|
||||||
hide(false);
|
hide(false);
|
||||||
|
@ -179,7 +198,7 @@ public class WorkspaceExplorerSaveDialog extends Modal implements HasWorskpaceEx
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Adds the handlers.
|
||||||
*/
|
*/
|
||||||
private void addHandlers() {
|
private void addHandlers() {
|
||||||
|
|
||||||
|
@ -218,7 +237,6 @@ public class WorkspaceExplorerSaveDialog extends Modal implements HasWorskpaceEx
|
||||||
* Sets the file name.
|
* Sets the file name.
|
||||||
*
|
*
|
||||||
* @param txt the txt
|
* @param txt the txt
|
||||||
* @param select the select
|
|
||||||
*/
|
*/
|
||||||
private void setFileName(final String txt){
|
private void setFileName(final String txt){
|
||||||
if(txt==null)
|
if(txt==null)
|
||||||
|
@ -240,7 +258,8 @@ public class WorkspaceExplorerSaveDialog extends Modal implements HasWorskpaceEx
|
||||||
/**
|
/**
|
||||||
* Notify parent selected.
|
* Notify parent selected.
|
||||||
*
|
*
|
||||||
* @param selected the selected
|
* @param parent the parent
|
||||||
|
* @param fileName the file name
|
||||||
*/
|
*/
|
||||||
private void notifySaving(Item parent, String fileName) {
|
private void notifySaving(Item parent, String fileName) {
|
||||||
|
|
||||||
|
@ -303,6 +322,8 @@ public class WorkspaceExplorerSaveDialog extends Modal implements HasWorskpaceEx
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Gets the save button.
|
||||||
|
*
|
||||||
* @return the saveButton
|
* @return the saveButton
|
||||||
*/
|
*/
|
||||||
public Button getSaveButton() {
|
public Button getSaveButton() {
|
||||||
|
|
Loading…
Reference in New Issue