Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.app / org.gvsig.app.mainplugin / src / main / java / org / gvsig / app / project / documents / view / IContextMenuAction.java @ 40558

History | View | Annotate | Download (2.57 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.app.project.documents.view;
25

    
26

    
27
/**
28
 * Interface que deben de cumplir una acci?n aplicable dede un
29
 * Menu contextual o popup.
30
 * <br>
31
 * Las acciones se deben registrar en el punto de extensi?n adecuado * 
32
 * <br><br>
33
 * Por lo general extender de la clase AbstractDocumentAction
34
 * 
35
 *  
36
 * 
37
 * @author Jose Manuel Viv? (Chema)
38
 */
39

    
40
public interface IContextMenuAction {
41
        
42
        /**
43
         * Dice si la acci?n es visible 
44
         * segun los documentos seleccionados
45
         * <br>
46
         * @param item elemento sobre el que se ha pulsado
47
         * @param selectedItems elementos seleccionados en el momento de pulsar
48
         * 
49
         */
50
        public boolean isVisible(Object item, Object[] selectedItems);
51
        
52
        /**
53
         * Dice si la acci?n esta habilitada 
54
         * segun los documentos seleccionados
55
         * <br>
56
         * @param item elemento sobre el que se ha pulsado
57
         * @param selectedItems elementos seleccionados en el momento de pulsar
58
         * 
59
         */
60
        public boolean isEnabled(Object item, Object[] selectedItems);
61
        
62
        /**
63
         * Ejecuta la acci?n sobre los documentos seleccionados
64
         * <br>
65
         * @param item elemento sobre el que se ha pulsado
66
         * @param selectedItems elementos seleccionados en el momento de pulsar
67
         * 
68
         */
69
        public void execute(Object item, Object[] selectedItems);
70
        
71
        /**
72
         * Nombre del grupo al que pertenece la accion
73
         */
74
        public String getGroup();
75
        
76
        /**
77
         * Orden del grupo al que pertenece la acci?n
78
         */
79
        public int getGroupOrder();
80
        
81
        /**
82
         * Orden del elemento dentro del grupo
83
         */
84
        public int getOrder();
85
        
86
        /**
87
         * Texto del elemento
88
         */
89
        public String getText();
90
        
91
        /**
92
         * Descripci?n mas detallada de la acci?n
93
         * (se utilizar? como Tooltip)
94
         */
95
        public String getDescription();        
96
        
97
}