Statistics
| Revision:

root / trunk / extensions / extWFS2 / src / com / iver / cit / gvsig / gui / toc / WFSPropsTocMenuEntry.java @ 7304

History | View | Annotate | Download (2.92 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 7304 2006-09-15 10:44:24Z caballero $
57
 * $Log$
58
 * Revision 1.3  2006-09-15 10:44:16  caballero
59
 * extensibilidad de documentos
60
 *
61
 * Revision 1.2  2006/08/29 07:56:12  cesar
62
 * Rename the *View* family of classes to *Window* (ie: SingletonView to SingletonWindow, ViewInfo to WindowInfo, etc)
63
 *
64
 * Revision 1.1  2006/06/21 12:35:45  jorpiell
65
 * 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
66
 *
67
 *
68
 */
69
/**
70
 * @author Jorge Piera Llodr? (piera_jor@gva.es)
71
 */
72
public class WFSPropsTocMenuEntry extends TocMenuEntry {
73
        private JMenuItem propsMenuItem;
74
        FLayer lyr = null;
75
        
76
        public void initialize(FPopupMenu m) {
77
                super.initialize(m);
78
                
79
                if (isTocItemBranch()) {
80
                        lyr = getNodeLayer();
81
                    if ((lyr instanceof FLyrWFS)) {
82
                            propsMenuItem = new JMenuItem(PluginServices.getText(this, "wfs_properties"));
83
                            getMenu().add( propsMenuItem );
84
                            propsMenuItem.setFont(FPopupMenu.theFont);
85
                            getMenu().setEnabled(true);
86
                            propsMenuItem.addActionListener(this);                           
87
                     }
88
                }
89
        }
90
        
91
        public void actionPerformed(ActionEvent e) {
92
                lyr = getNodeLayer();
93
               WFSPropsDialog dialog = new WFSPropsDialog(lyr);
94
               PluginServices.getMDIManager().addWindow(dialog);
95
        }
96

    
97
}