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 @ 41619

History | View | Annotate | Download (2.81 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
    /**
48
     * Register the action in the actions of the system, and return the action
49
     * that is registered.
50
     * 
51
     * If an action with the same name is in the system then actions are merged
52
     * and the merged action is returned and remain in the system.
53
     * 
54
     * @param action
55
     */
56
    public ActionInfo registerAction(ActionInfo action);
57
     
58
    /**
59
     * Retrieve an action by name
60
     * 
61
     * @param name
62
     * @return the action associated to this name
63
     */
64
    public ActionInfo getAction(String name);
65
    
66
    /**
67
     * Return an iterator over all registered actions.
68
     * 
69
     * @return iterator over al acctions
70
     */
71
    public Iterator<ActionInfo> getActions();
72
    
73
    public ActionInfoStatusCache createActionStatusCache();
74
    
75
    /**
76
     * Redirect the action source to the target.
77
     * 
78
     * @param sourceName of action
79
     * @param targetName of action
80
     */
81
    public void redirect(String sourceName, String targetName);
82
    
83
    public void execute(String actionName, Object[] parameters);
84
}