root / branches / v2_0_0_prep / frameworks / _fwAndami / src / org / gvsig / andami / actioninfo / ActionInfoManager.java @ 38619
History | View | Annotate | Download (1.81 KB)
1 |
package org.gvsig.andami.actioninfo; |
---|---|
2 |
|
3 |
import java.util.Iterator; |
4 |
|
5 |
import org.gvsig.andami.plugins.IExtension; |
6 |
|
7 |
public interface ActionInfoManager { |
8 |
|
9 |
/**
|
10 |
* Create a new action and return.
|
11 |
*
|
12 |
* @param extension, class that execute the action, extends IExtension
|
13 |
* @param name, name of the action
|
14 |
* @param text, text to use to represent the action.
|
15 |
* @param command, command used to execute the action
|
16 |
* @param icon, icon used to represent the action
|
17 |
* @param accelerator, the key which invokes the action
|
18 |
* @param position, position of the action when it is represented in the user interface
|
19 |
* @param tip, tooltip to associate to the action
|
20 |
* @return
|
21 |
*/
|
22 |
public ActionInfo createAction(Class<? extends IExtension> extension, String name, String text, String command, String icon, String accelerator, long position, String tip); |
23 |
|
24 |
/**
|
25 |
* Register the action in the actions of the system, and return the action
|
26 |
* that is registered.
|
27 |
*
|
28 |
* If an action with the same name is in the system then actions are merged
|
29 |
* and the merged action is returned and remain in the system.
|
30 |
*
|
31 |
* @param action
|
32 |
*/
|
33 |
public ActionInfo registerAction(ActionInfo action);
|
34 |
|
35 |
/**
|
36 |
* Retrieve an action by name
|
37 |
*
|
38 |
* @param name
|
39 |
* @return the action associated to this name
|
40 |
*/
|
41 |
public ActionInfo getAction(String name); |
42 |
|
43 |
/**
|
44 |
* Return an iterator over all registered actions.
|
45 |
*
|
46 |
* @return iterator over al acctions
|
47 |
*/
|
48 |
public Iterator<ActionInfo> getActions(); |
49 |
|
50 |
public ActionInfoStatusCache createActionStatusCache();
|
51 |
|
52 |
/**
|
53 |
* Redirect the action source to the target.
|
54 |
*
|
55 |
* @param sourceName of action
|
56 |
* @param targetName of action
|
57 |
*/
|
58 |
public void redirect(String sourceName, String targetName); |
59 |
} |