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 | 40559 | jjdelcerro | /**
|
---|---|---|---|
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 | 40435 | jjdelcerro | 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 | 42161 | fdiaz | *
|
35 | 40435 | jjdelcerro | * @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 | 42161 | fdiaz | |
47 | 42348 | jjdelcerro | public ActionInfo createAction(IExtension extension, String name, String text, String command, String icon, String accelerator, long position, String tip); |
48 | |||
49 | 40435 | jjdelcerro | /**
|
50 | * Register the action in the actions of the system, and return the action
|
||
51 | * that is registered.
|
||
52 | 42161 | fdiaz | *
|
53 | 40435 | jjdelcerro | * 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 | 42161 | fdiaz | *
|
56 | 40435 | jjdelcerro | * @param action
|
57 | */
|
||
58 | public ActionInfo registerAction(ActionInfo action);
|
||
59 | 42161 | fdiaz | |
60 | 40435 | jjdelcerro | /**
|
61 | * Retrieve an action by name
|
||
62 | 42161 | fdiaz | *
|
63 | 40435 | jjdelcerro | * @param name
|
64 | * @return the action associated to this name
|
||
65 | */
|
||
66 | public ActionInfo getAction(String name); |
||
67 | 42161 | fdiaz | |
68 | 40435 | jjdelcerro | /**
|
69 | * Return an iterator over all registered actions.
|
||
70 | 42161 | fdiaz | *
|
71 | 40435 | jjdelcerro | * @return iterator over al acctions
|
72 | */
|
||
73 | public Iterator<ActionInfo> getActions(); |
||
74 | 42161 | fdiaz | |
75 | 40435 | jjdelcerro | public ActionInfoStatusCache createActionStatusCache();
|
76 | 42161 | fdiaz | |
77 | 40435 | jjdelcerro | /**
|
78 | * Redirect the action source to the target.
|
||
79 | 42161 | fdiaz | *
|
80 | 40435 | jjdelcerro | * @param sourceName of action
|
81 | * @param targetName of action
|
||
82 | */
|
||
83 | public void redirect(String sourceName, String targetName); |
||
84 | 42161 | fdiaz | |
85 | 41619 | jjdelcerro | public void execute(String actionName, Object[] parameters); |
86 | 42161 | fdiaz | |
87 | public ActionInfo getTranslated(ActionInfo actionInfo);
|
||
88 | 40435 | jjdelcerro | } |