svn-gvsig-desktop / tags / v1_0_2_Build_905 / extensions / extWFS2 / src / com / iver / cit / gvsig / gui / toc / WFSPropsTocMenuEntry.java @ 10767
History | View | Annotate | Download (3.18 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 |
import com.iver.cit.gvsig.project.documents.view.toc.TocMenuEntry; |
12 |
import com.iver.cit.gvsig.project.documents.view.toc.gui.FPopupMenu; |
13 |
|
14 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
15 |
*
|
16 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
17 |
*
|
18 |
* This program is free software; you can redistribute it and/or
|
19 |
* modify it under the terms of the GNU General Public License
|
20 |
* as published by the Free Software Foundation; either version 2
|
21 |
* of the License, or (at your option) any later version.
|
22 |
*
|
23 |
* This program is distributed in the hope that it will be useful,
|
24 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
25 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
26 |
* GNU General Public License for more details.
|
27 |
*
|
28 |
* You should have received a copy of the GNU General Public License
|
29 |
* along with this program; if not, write to the Free Software
|
30 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
31 |
*
|
32 |
* For more information, contact:
|
33 |
*
|
34 |
* Generalitat Valenciana
|
35 |
* Conselleria d'Infraestructures i Transport
|
36 |
* Av. Blasco Ib??ez, 50
|
37 |
* 46010 VALENCIA
|
38 |
* SPAIN
|
39 |
*
|
40 |
* +34 963862235
|
41 |
* gvsig@gva.es
|
42 |
* www.gvsig.gva.es
|
43 |
*
|
44 |
* or
|
45 |
*
|
46 |
* IVER T.I. S.A
|
47 |
* Salamanca 50
|
48 |
* 46005 Valencia
|
49 |
* Spain
|
50 |
*
|
51 |
* +34 963163400
|
52 |
* dac@iver.es
|
53 |
*/
|
54 |
/* CVS MESSAGES:
|
55 |
*
|
56 |
* $Id: WFSPropsTocMenuEntry.java 8847 2006-11-17 11:29:00Z ppiqueras $
|
57 |
* $Log$
|
58 |
* Revision 1.2.2.2 2006-11-17 11:28:45 ppiqueras
|
59 |
* Corregidos bugs y a?adida nueva funcionalidad.
|
60 |
*
|
61 |
* Revision 1.5 2006/10/27 12:07:18 ppiqueras
|
62 |
* Nueva funcionalidad
|
63 |
*
|
64 |
* Revision 1.4 2006/10/02 09:09:45 jorpiell
|
65 |
* Cambios del 10 copiados al head
|
66 |
*
|
67 |
* Revision 1.2 2006/08/29 07:56:12 cesar
|
68 |
* Rename the *View* family of classes to *Window* (ie: SingletonView to SingletonWindow, ViewInfo to WindowInfo, etc)
|
69 |
*
|
70 |
* Revision 1.1 2006/06/21 12:35:45 jorpiell
|
71 |
* 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
|
72 |
*
|
73 |
*
|
74 |
*/
|
75 |
/**
|
76 |
* @author Jorge Piera Llodr? (piera_jor@gva.es)
|
77 |
*/
|
78 |
public class WFSPropsTocMenuEntry extends TocMenuEntry { |
79 |
private JMenuItem propsMenuItem; |
80 |
FLayer lyr = null;
|
81 |
|
82 |
public void initialize(FPopupMenu m) { |
83 |
super.initialize(m);
|
84 |
|
85 |
if (isTocItemBranch()) {
|
86 |
lyr = getNodeLayer(); |
87 |
if ((lyr instanceof FLyrWFS)) { |
88 |
propsMenuItem = new JMenuItem(PluginServices.getText(this, "wfs_properties")); |
89 |
getMenu().add( propsMenuItem ); |
90 |
propsMenuItem.setFont(FPopupMenu.theFont); |
91 |
getMenu().setEnabled(true);
|
92 |
propsMenuItem.addActionListener(this);
|
93 |
} |
94 |
} |
95 |
} |
96 |
|
97 |
public void actionPerformed(ActionEvent e) { |
98 |
lyr = getNodeLayer(); |
99 |
WFSPropsDialog dialog = new WFSPropsDialog(lyr);
|
100 |
dialog.setWFSFilterPanelIsAsTabForWFSLayersLoad(false); //true); // false |
101 |
PluginServices.getMDIManager().addWindow(dialog); |
102 |
} |
103 |
|
104 |
} |