Statistics
| Branch: | Tag: | Revision:

root / src / org / gss_project / gss / web / client / commands / RefreshCommand.java @ 1205:fbeae20462e6

History | View | Annotate | Download (2.1 kB)

1 281:fb551fab7327 koutsoub
/*
2 281:fb551fab7327 koutsoub
 * Copyright 2009 Electronic Business Systems Ltd.
3 281:fb551fab7327 koutsoub
 *
4 281:fb551fab7327 koutsoub
 * This file is part of GSS.
5 281:fb551fab7327 koutsoub
 *
6 281:fb551fab7327 koutsoub
 * GSS is free software: you can redistribute it and/or modify
7 281:fb551fab7327 koutsoub
 * it under the terms of the GNU General Public License as published by
8 281:fb551fab7327 koutsoub
 * the Free Software Foundation, either version 3 of the License, or
9 281:fb551fab7327 koutsoub
 * (at your option) any later version.
10 281:fb551fab7327 koutsoub
 *
11 281:fb551fab7327 koutsoub
 * GSS is distributed in the hope that it will be useful,
12 281:fb551fab7327 koutsoub
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 281:fb551fab7327 koutsoub
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 281:fb551fab7327 koutsoub
 * GNU General Public License for more details.
15 281:fb551fab7327 koutsoub
 *
16 281:fb551fab7327 koutsoub
 * You should have received a copy of the GNU General Public License
17 281:fb551fab7327 koutsoub
 * along with GSS.  If not, see <http://www.gnu.org/licenses/>.
18 281:fb551fab7327 koutsoub
 */
19 1205:fbeae20462e6 chstath
package org.gss_project.gss.web.client.commands;
20 281:fb551fab7327 koutsoub
21 1205:fbeae20462e6 chstath
import org.gss_project.gss.web.client.FileMenu;
22 1205:fbeae20462e6 chstath
import org.gss_project.gss.web.client.GSS;
23 1205:fbeae20462e6 chstath
import org.gss_project.gss.web.client.rest.resource.FileResource;
24 1205:fbeae20462e6 chstath
import org.gss_project.gss.web.client.rest.resource.GroupUserResource;
25 281:fb551fab7327 koutsoub
26 281:fb551fab7327 koutsoub
import java.util.List;
27 281:fb551fab7327 koutsoub
28 281:fb551fab7327 koutsoub
import com.google.gwt.user.client.Command;
29 281:fb551fab7327 koutsoub
import com.google.gwt.user.client.ui.PopupPanel;
30 281:fb551fab7327 koutsoub
31 281:fb551fab7327 koutsoub
32 281:fb551fab7327 koutsoub
/**
33 281:fb551fab7327 koutsoub
 * @author kman
34 281:fb551fab7327 koutsoub
 *
35 281:fb551fab7327 koutsoub
 */
36 281:fb551fab7327 koutsoub
public class RefreshCommand implements Command {
37 281:fb551fab7327 koutsoub
38 281:fb551fab7327 koutsoub
        final FileMenu.Images newImages;
39 281:fb551fab7327 koutsoub
40 281:fb551fab7327 koutsoub
        private PopupPanel containerPanel;
41 281:fb551fab7327 koutsoub
42 281:fb551fab7327 koutsoub
        /**
43 281:fb551fab7327 koutsoub
         * @param _containerPanel
44 281:fb551fab7327 koutsoub
         * @param _newImages the images of all the possible delete dialogs
45 281:fb551fab7327 koutsoub
         */
46 281:fb551fab7327 koutsoub
        public RefreshCommand(PopupPanel _containerPanel, final FileMenu.Images _newImages) {
47 281:fb551fab7327 koutsoub
                containerPanel = _containerPanel;
48 281:fb551fab7327 koutsoub
                newImages = _newImages;
49 281:fb551fab7327 koutsoub
        }
50 281:fb551fab7327 koutsoub
51 623:66f69a7348ed pastith
        @Override
52 281:fb551fab7327 koutsoub
        public void execute() {
53 281:fb551fab7327 koutsoub
                containerPanel.hide();
54 281:fb551fab7327 koutsoub
                if (GSS.get().getCurrentSelection() instanceof FileResource || GSS.get().getCurrentSelection() instanceof List)
55 281:fb551fab7327 koutsoub
                        GSS.get().showFileList(true);
56 281:fb551fab7327 koutsoub
                else if (GSS.get().getCurrentSelection() instanceof GroupUserResource)
57 281:fb551fab7327 koutsoub
                        return;
58 281:fb551fab7327 koutsoub
                else{
59 984:8cc6d94b1ae5 koutsoub
                        //TODO:CELLTREE
60 984:8cc6d94b1ae5 koutsoub
                        //DnDTreeItem selectedTreeItem = (DnDTreeItem) GSS.get().getFolders().getCurrent();
61 984:8cc6d94b1ae5 koutsoub
                        //if(selectedTreeItem != null){
62 984:8cc6d94b1ae5 koutsoub
                                //GSS.get().getFolders().updateFolder(selectedTreeItem);
63 1003:2330cb50c605 koutsoub
                        GSS.get().getTreeView().updateNode(GSS.get().getTreeView().getSelection());
64 281:fb551fab7327 koutsoub
                                GSS.get().showFileList(true);
65 984:8cc6d94b1ae5 koutsoub
                        //}
66 281:fb551fab7327 koutsoub
                }
67 281:fb551fab7327 koutsoub
        }
68 281:fb551fab7327 koutsoub
}