Statistics
| Revision:

svn-gvsig-desktop / branches / v10 / extensions / extPublish / src / org / gvsig / publish / gui / ogcMetadata / OGCLayerMetadataPanel.java @ 19900

History | View | Annotate | Download (3.46 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2004-2006 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 *
19
 * For more information, contact:
20
 *
21
 *   Generalitat Valenciana
22
 *   Conselleria d'Infraestructures i Transport
23
 *   Av. Blasco Iba?ez, 50
24
 *   46010 VALENCIA
25
 *   SPAIN
26
 *
27
 *   +34 963862235
28
 *   gvsig@gva.es
29
 *   www.gvsig.gva.es
30
 *
31
 *    or
32
 *
33
 *   IVER T.I. S.A
34
 *   Salamanca 50
35
 *   46005 Valencia
36
 *   Spain
37
 *
38
 *   +34 963163400
39
 *   dac@iver.es
40
 */
41
package org.gvsig.publish.gui.ogcMetadata;
42

    
43
import java.util.EventListener;
44

    
45
import javax.swing.JPanel;
46

    
47
import org.gvsig.publish.gui.publish.IPublishPluginPanel;
48
import org.gvsig.publish.ogcmetadata.IOGCLayerMetadata;
49

    
50
import com.iver.andami.PluginServices;
51

    
52
public class OGCLayerMetadataPanel extends JPanel implements IPublishPluginPanel {
53
        /**
54
         * 
55
         */
56
        private static final long serialVersionUID = -7415209435536089676L;
57
        /*
58
         * model
59
         */
60
        private IOGCLayerMetadata model_layerwms = null; 
61
        
62
        public OGCLayerMetadataPanel() {
63
                initComponents();
64
                initLabels();
65
        }
66
        private void initLabels(){
67
                setBorder(javax.swing.BorderFactory.createTitledBorder(PluginServices.getText(this,"layer_wms111")));
68
                isQueryableCheck.setText(PluginServices.getText(this,"is_queryable"));
69
        }
70
    private void initComponents() {
71
        java.awt.GridBagConstraints gridBagConstraints;
72

    
73
        isQueryableCheck = new javax.swing.JCheckBox();
74

    
75
        setBorder(javax.swing.BorderFactory.createTitledBorder("Layer WMS 1.1.1"));
76
        setLayout(new java.awt.GridBagLayout());
77

    
78
        isQueryableCheck.setText("is queryable");
79
        isQueryableCheck.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
80
        isQueryableCheck.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
81
        isQueryableCheck.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
82
        isQueryableCheck.setMargin(new java.awt.Insets(0, 0, 0, 0));
83
        gridBagConstraints = new java.awt.GridBagConstraints();
84
        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
85
        gridBagConstraints.weightx = 1.0;
86
        gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
87
        add(isQueryableCheck, gridBagConstraints);
88
    }// </editor-fold>
89
    
90
    
91
    // Variables declaration - do not modify
92
    private javax.swing.JCheckBox isQueryableCheck;
93
    // End of variables declaration
94
        
95
        public Object getModel() {
96
                model_layerwms.setQueryable(isQueryableCheck.isSelected());
97
                return model_layerwms;
98
        }
99

    
100
        public void setListener(EventListener listener) {
101
                // TODO Auto-generated method stub
102

    
103
        }
104

    
105
        public void setModel(Object entityModel) {
106
                //Cast to LayerWMS111Metadata
107
                model_layerwms = (IOGCLayerMetadata)entityModel;
108
                isQueryableCheck.setSelected(model_layerwms.isQueryable());
109
        }
110

    
111
}