root / trunk / applications / appgvSIG / src / com / iver / cit / gvsig / project / documents / IContextMenuAction.java @ 37338
History | View | Annotate | Download (2.72 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government.
|
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 2
|
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., 59 Temple Place - Suite 330,
|
19 |
* Boston, MA 02111-1307, USA.
|
20 |
*
|
21 |
*/
|
22 |
package com.iver.cit.gvsig.project.documents; |
23 |
|
24 |
/**
|
25 |
* Interface que deben de cumplir una acci?n aplicable dede un Menu contextual o
|
26 |
* popup. <br>
|
27 |
* Las acciones se deben registrar en el punto de extensi?n adecuado * <br>
|
28 |
* <br>
|
29 |
* Por lo general extender de la clase AbstractDocumentAction
|
30 |
*
|
31 |
*
|
32 |
*
|
33 |
* @author Jose Manuel Viv? (Chema)
|
34 |
*/
|
35 |
|
36 |
public interface IContextMenuAction { |
37 |
|
38 |
/**
|
39 |
* Dice si la acci?n es visible segun los documentos seleccionados <br>
|
40 |
*
|
41 |
* @param item
|
42 |
* elemento sobre el que se ha pulsado
|
43 |
* @param selectedItems
|
44 |
* elementos seleccionados en el momento de pulsar
|
45 |
*
|
46 |
*/
|
47 |
public boolean isVisible(Object item, Object[] selectedItems); |
48 |
|
49 |
/**
|
50 |
* Dice si la acci?n esta habilitada segun los documentos seleccionados <br>
|
51 |
*
|
52 |
* @param item
|
53 |
* elemento sobre el que se ha pulsado
|
54 |
* @param selectedItems
|
55 |
* elementos seleccionados en el momento de pulsar
|
56 |
*
|
57 |
*/
|
58 |
public boolean isEnabled(Object item, Object[] selectedItems); |
59 |
|
60 |
/**
|
61 |
* Ejecuta la acci?n sobre los documentos seleccionados <br>
|
62 |
*
|
63 |
* @param item
|
64 |
* elemento sobre el que se ha pulsado
|
65 |
* @param selectedItems
|
66 |
* 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 (se utilizar? como Tooltip)
|
93 |
*/
|
94 |
public String getDescription(); |
95 |
|
96 |
} |