Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.framework / org.gvsig.andami / src / main / java / org / gvsig / andami / actioninfo / ActionInfoManager.java @ 43372

History | View | Annotate | Download (3 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright (C) 2007-2013 gvSIG Association.
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 3
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24
package org.gvsig.andami.actioninfo;
25

    
26
import java.util.Iterator;
27

    
28
import org.gvsig.andami.plugins.IExtension;
29

    
30
public interface ActionInfoManager {
31

    
32
        /**
33
         * Create a new action and return.
34
         *
35
         * @param extension, class that execute the action, extends IExtension
36
         * @param name, name of the action
37
         * @param text, text to use to represent the action.
38
         * @param command, command used to execute the action
39
         * @param icon, icon used to represent the action
40
         * @param accelerator, the key which invokes the action
41
         * @param position, position of the action when it is represented in the user interface
42
         * @param tip, tooltip to associate to the action
43
         * @return
44
         */
45
    public ActionInfo createAction(Class<? extends IExtension> extension, String name, String text, String command, String icon, String accelerator, long position, String tip);
46

    
47
    public ActionInfo createAction(IExtension extension, String name, String text, String command, String icon, String accelerator, long position, String tip);
48

    
49
    /**
50
     * Register the action in the actions of the system, and return the action
51
     * that is registered.
52
     *
53
     * If an action with the same name is in the system then actions are merged
54
     * and the merged action is returned and remain in the system.
55
     *
56
     * @param action
57
     */
58
    public ActionInfo registerAction(ActionInfo action);
59

    
60
    /**
61
     * Retrieve an action by name
62
     *
63
     * @param name
64
     * @return the action associated to this name
65
     */
66
    public ActionInfo getAction(String name);
67

    
68
    /**
69
     * Return an iterator over all registered actions.
70
     *
71
     * @return iterator over al acctions
72
     */
73
    public Iterator<ActionInfo> getActions();
74

    
75
    public ActionInfoStatusCache createActionStatusCache();
76

    
77
    /**
78
     * Redirect the action source to the target.
79
     *
80
     * @param sourceName of action
81
     * @param targetName of action
82
     */
83
    public void redirect(String sourceName, String targetName);
84

    
85
    public void execute(String actionName, Object[] parameters);
86

    
87
    public ActionInfo getTranslated(ActionInfo actionInfo);
88
}