root / trunk / extensions / extWFS2 / src / com / iver / cit / gvsig / gui / toc / WFSPropsTocMenuEntry.java @ 5948
History | View | Annotate | Download (2.55 KB)
1 |
package com.iver.cit.gvsig.gui.toc; |
---|---|
2 |
|
3 |
import java.awt.event.ActionEvent; |
4 |
|
5 |
import javax.swing.JMenuItem; |
6 |
|
7 |
import com.iver.andami.PluginServices; |
8 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
9 |
import com.iver.cit.gvsig.fmap.layers.FLyrWFS; |
10 |
import com.iver.cit.gvsig.gui.dialogs.WFSPropsDialog; |
11 |
|
12 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
13 |
*
|
14 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
15 |
*
|
16 |
* This program is free software; you can redistribute it and/or
|
17 |
* modify it under the terms of the GNU General Public License
|
18 |
* as published by the Free Software Foundation; either version 2
|
19 |
* of the License, or (at your option) any later version.
|
20 |
*
|
21 |
* This program is distributed in the hope that it will be useful,
|
22 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24 |
* GNU General Public License for more details.
|
25 |
*
|
26 |
* You should have received a copy of the GNU General Public License
|
27 |
* along with this program; if not, write to the Free Software
|
28 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
29 |
*
|
30 |
* For more information, contact:
|
31 |
*
|
32 |
* Generalitat Valenciana
|
33 |
* Conselleria d'Infraestructures i Transport
|
34 |
* Av. Blasco Ib??ez, 50
|
35 |
* 46010 VALENCIA
|
36 |
* SPAIN
|
37 |
*
|
38 |
* +34 963862235
|
39 |
* gvsig@gva.es
|
40 |
* www.gvsig.gva.es
|
41 |
*
|
42 |
* or
|
43 |
*
|
44 |
* IVER T.I. S.A
|
45 |
* Salamanca 50
|
46 |
* 46005 Valencia
|
47 |
* Spain
|
48 |
*
|
49 |
* +34 963163400
|
50 |
* dac@iver.es
|
51 |
*/
|
52 |
/* CVS MESSAGES:
|
53 |
*
|
54 |
* $Id: WFSPropsTocMenuEntry.java 5948 2006-06-21 12:35:45Z jorpiell $
|
55 |
* $Log$
|
56 |
* Revision 1.1 2006-06-21 12:35:45 jorpiell
|
57 |
* Se ha a?adido la ventana de propiedades. Esto implica a?adir listeners por todos los paneles. Adem?s no se muestra la geomatr?a en la lista de atributos y se muestran ?nicamnete los que se van a descargar
|
58 |
*
|
59 |
*
|
60 |
*/
|
61 |
/**
|
62 |
* @author Jorge Piera Llodr? (piera_jor@gva.es)
|
63 |
*/
|
64 |
public class WFSPropsTocMenuEntry extends TocMenuEntry { |
65 |
private JMenuItem propsMenuItem; |
66 |
FLayer lyr = null;
|
67 |
|
68 |
public void initialize(FPopupMenu m) { |
69 |
super.initialize(m);
|
70 |
|
71 |
if (isTocItemBranch()) {
|
72 |
lyr = getNodeLayer(); |
73 |
if ((lyr instanceof FLyrWFS)) { |
74 |
propsMenuItem = new JMenuItem(PluginServices.getText(this, "wfs_properties")); |
75 |
getMenu().add( propsMenuItem ); |
76 |
propsMenuItem.setFont(FPopupMenu.theFont); |
77 |
getMenu().setEnabled(true);
|
78 |
propsMenuItem.addActionListener(this);
|
79 |
} |
80 |
} |
81 |
} |
82 |
|
83 |
public void actionPerformed(ActionEvent e) { |
84 |
lyr = getNodeLayer(); |
85 |
WFSPropsDialog dialog = new WFSPropsDialog(lyr);
|
86 |
PluginServices.getMDIManager().addView(dialog); |
87 |
} |
88 |
|
89 |
} |