Statistics
| Revision:

svn-gvsig-desktop / tags / v1_0_2_Build_902 / extensions / extGeoProcessing / src / com / iver / cit / gvsig / geoprocess / impl / spatialjoin / gui / GeoProcessingSpatialJoinPanel2.java @ 10681

History | View | Annotate | Download (3.22 KB)

1 6749 azabala
/*
2
 * Created on 09-ago-2006
3
 *
4
 * gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
5
 *
6
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
7
 *
8
 * This program is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation; either version 2
11
 * of the License, or (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
21
 *
22
 * For more information, contact:
23
 *
24
 *  Generalitat Valenciana
25
 *   Conselleria d'Infraestructures i Transport
26
 *   Av. Blasco Ib??ez, 50
27
 *   46010 VALENCIA
28
 *   SPAIN
29
 *
30
 *      +34 963862235
31
 *   gvsig@gva.es
32
 *      www.gvsig.gva.es
33
 *
34
 *    or
35
 *
36
 *   IVER T.I. S.A
37
 *   Salamanca 50
38
 *   46005 Valencia
39
 *   Spain
40
 *
41
 *   +34 963163400
42
 *   dac@iver.es
43
 */
44
/* CVS MESSAGES:
45
*
46
* $Id$
47
* $Log$
48 8765 jjdelcerro
* Revision 1.1.2.2  2006-11-15 00:08:17  jjdelcerro
49
* *** empty log message ***
50 7374 azabala
*
51 8765 jjdelcerro
* Revision 1.2  2006/09/19 19:24:09  azabala
52
* fixed bug (sumarization function dialog showed always the same fields, first selected layer fields in combo box)
53
*
54 7374 azabala
* Revision 1.1  2006/08/11 16:30:38  azabala
55 6749 azabala
* *** empty log message ***
56
*
57
*
58
*/
59
package com.iver.cit.gvsig.geoprocess.impl.spatialjoin.gui;
60
61
import java.awt.Insets;
62
import java.util.Map;
63
64
import javax.swing.JCheckBox;
65
66
import com.iver.andami.PluginServices;
67
import com.iver.cit.gvsig.fmap.layers.FLayers;
68
import com.iver.cit.gvsig.fmap.layers.FLyrVect;
69
import com.iver.cit.gvsig.geoprocess.core.gui.GeoProcessingOverlayPanel2;
70
import com.iver.cit.gvsig.geoprocess.core.gui.SpatialJoinNumericFieldSelection;
71
72
public class GeoProcessingSpatialJoinPanel2 extends
73
                GeoProcessingOverlayPanel2 implements SpatialJoinPanelIF{
74
75
76
        private JCheckBox nearestCheckbox;
77
78
        private SpatialJoinNumericFieldSelection fieldDialog;
79
80
        private Map sumarizeFunctions;
81
82
83
        public GeoProcessingSpatialJoinPanel2(FLayers layers) {
84
                super(layers, PluginServices.
85
                                                        getText(null,
86
                                                        "Enlace_espacial._Introduccion_de_datos") +
87
                                                        ":");
88
        }
89
        protected void addSpecificDesign() {
90
                super.addSpecificDesign();
91
                Insets insets = new Insets(5, 5, 5, 5);
92
                nearestCheckbox = new JCheckBox();
93
                nearestCheckbox.setText(PluginServices.
94
                                getText(this, "Obtener_mas_proximo"));
95
                addComponent(nearestCheckbox, insets);
96
        }
97
98
99
        public boolean isNearestSelected() {
100
                return nearestCheckbox.isSelected();
101
        }
102
103
        public FLyrVect getFirstLayer(){
104
                return this.getInputLayer();
105
        }
106
107
        public boolean openSumarizeFunction() {
108 7374 azabala
                //if(fieldDialog == null){
109 6749 azabala
                        fieldDialog = new SpatialJoinNumericFieldSelection(getSecondLayer());
110
                        fieldDialog.pack();
111 7374 azabala
                //}
112 6749 azabala
                fieldDialog.setSize(560,300);
113
                fieldDialog.setVisible(true);
114
                sumarizeFunctions = fieldDialog.getSumarizationFunctions();
115
                return fieldDialog.isOk();
116
        }
117
118
119
120
        public Map getSumarizeFunctions() {
121
                return sumarizeFunctions;
122
        }
123
124
}