svn-gvsig-desktop / trunk / extensions / extWFS2 / src / com / iver / cit / gvsig / gui / toc / WFSPropsTocMenuEntry.java @ 10072
History | View | Annotate | Download (3.52 KB)
1 | 5948 | jorpiell | 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 | 7304 | caballero | import com.iver.cit.gvsig.project.documents.view.toc.TocMenuEntry; |
12 | import com.iver.cit.gvsig.project.documents.view.toc.gui.FPopupMenu; |
||
13 | 5948 | jorpiell | |
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$
|
||
57 | * $Log$
|
||
58 | 9335 | ppiqueras | * Revision 1.6 2006-12-15 13:51:35 ppiqueras
|
59 | * Notificar que se deben cargar los campos y valores conocidos de la capa actual cargada.
|
||
60 | *
|
||
61 | * Revision 1.5 2006/10/27 12:07:18 ppiqueras
|
||
62 | 8396 | ppiqueras | * Nueva funcionalidad
|
63 | *
|
||
64 | * Revision 1.4 2006/10/02 09:09:45 jorpiell
|
||
65 | 7721 | jorpiell | * Cambios del 10 copiados al head
|
66 | 7304 | caballero | *
|
67 | * Revision 1.2 2006/08/29 07:56:12 cesar
|
||
68 | 6880 | cesar | * 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 | 5948 | jorpiell | * 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 | 9335 | ppiqueras | * @author Pablo Piqueras Bartolom? (p_queras@hotmail.com)
|
78 | 5948 | jorpiell | */
|
79 | public class WFSPropsTocMenuEntry extends TocMenuEntry { |
||
80 | private JMenuItem propsMenuItem; |
||
81 | FLayer lyr = null;
|
||
82 | |||
83 | public void initialize(FPopupMenu m) { |
||
84 | super.initialize(m);
|
||
85 | |||
86 | if (isTocItemBranch()) {
|
||
87 | lyr = getNodeLayer(); |
||
88 | if ((lyr instanceof FLyrWFS)) { |
||
89 | propsMenuItem = new JMenuItem(PluginServices.getText(this, "wfs_properties")); |
||
90 | getMenu().add( propsMenuItem ); |
||
91 | propsMenuItem.setFont(FPopupMenu.theFont); |
||
92 | getMenu().setEnabled(true);
|
||
93 | propsMenuItem.addActionListener(this);
|
||
94 | } |
||
95 | } |
||
96 | } |
||
97 | |||
98 | public void actionPerformed(ActionEvent e) { |
||
99 | lyr = getNodeLayer(); |
||
100 | WFSPropsDialog dialog = new WFSPropsDialog(lyr);
|
||
101 | 9335 | ppiqueras | |
102 | // Notify that now the filter panel isn't the beginning tab
|
||
103 | dialog.setWFSFilterPanelIsAsTabForWFSLayersLoad(false);
|
||
104 | |||
105 | // Update information of all fields and values known to the WFSFilterPanel
|
||
106 | dialog.updateAllFieldsAndValuesKnownOfCurrentLayerToWFSFilterPanel(); |
||
107 | |||
108 | 6880 | cesar | PluginServices.getMDIManager().addWindow(dialog); |
109 | 5948 | jorpiell | } |
110 | |||
111 | } |