2 * Copyright (c) 2011 Greek Research and Technology Network
4 package gr.grnet.pithos.web.client.commands;
6 import gr.grnet.pithos.web.client.FileMenu;
7 import gr.grnet.pithos.web.client.GSS;
8 import gr.grnet.pithos.web.client.rest.resource.FileResource;
9 import gr.grnet.pithos.web.client.rest.resource.GroupUserResource;
11 import java.util.List;
13 import com.google.gwt.user.client.Command;
14 import com.google.gwt.user.client.ui.PopupPanel;
17 public class RefreshCommand implements Command {
19 final FileMenu.Images newImages;
21 private PopupPanel containerPanel;
24 * @param _containerPanel
25 * @param _newImages the images of all the possible delete dialogs
27 public RefreshCommand(PopupPanel _containerPanel, final FileMenu.Images _newImages) {
28 containerPanel = _containerPanel;
29 newImages = _newImages;
33 public void execute() {
34 containerPanel.hide();
35 if (GSS.get().getCurrentSelection() instanceof FileResource || GSS.get().getCurrentSelection() instanceof List)
36 GSS.get().showFileList(true);
37 else if (GSS.get().getCurrentSelection() instanceof GroupUserResource)
41 //DnDTreeItem selectedTreeItem = (DnDTreeItem) GSS.get().getFolders().getCurrent();
42 //if(selectedTreeItem != null){
43 //GSS.get().getFolders().updateFolder(selectedTreeItem);
44 GSS.get().getTreeView().updateNode(GSS.get().getTreeView().getSelection());
45 GSS.get().showFileList(true);