root / trunk / extensions / extGeoreferencing / src / org / gvsig / georeferencing / ui / options / GeorefOptionsPanel.java @ 18530
History | View | Annotate | Download (2.95 KB)
1 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007 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 |
package org.gvsig.georeferencing.ui.options; |
20 |
|
21 |
import java.awt.GridBagConstraints; |
22 |
import java.awt.GridBagLayout; |
23 |
|
24 |
import org.gvsig.georeferencing.ui.launcher.AlgorithmSelectionPanel; |
25 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelListener; |
26 |
import org.gvsig.gui.beans.defaultbuttonspanel.DefaultButtonsPanel; |
27 |
|
28 |
/**
|
29 |
* Panel general de opciones de georreferenciaci?n. Consta de dos paneles principales,
|
30 |
* el de selecci?n de algoritmo y el de selecci?n de opciones.
|
31 |
*
|
32 |
* 10/01/2008
|
33 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
34 |
*/
|
35 |
public class GeorefOptionsPanel extends DefaultButtonsPanel { |
36 |
private static final long serialVersionUID = 1L; |
37 |
private int polynomialDegree; |
38 |
|
39 |
private AlgorithmSelectionPanel algorithmPanel = null; |
40 |
private CheckOptionsPanel checkOptionsPanel = null; |
41 |
|
42 |
|
43 |
/**
|
44 |
* Constructor
|
45 |
* @param viewList Lista de nombres de las vistas disponibles
|
46 |
* @param degreeList grado m?ximo para la georreferenciaci?n polinomial
|
47 |
*/
|
48 |
public GeorefOptionsPanel(int polynomialDegree, ButtonsPanelListener listener) { |
49 |
this.polynomialDegree = polynomialDegree;
|
50 |
|
51 |
//Ocultamos el bot?n de aplicar
|
52 |
getButtonsPanel().addButtonPressedListener(listener); |
53 |
init(); |
54 |
} |
55 |
|
56 |
/**
|
57 |
* Acciones de inicializaci?n del panel
|
58 |
*/
|
59 |
public void init() { |
60 |
GridBagLayout gl = new GridBagLayout(); |
61 |
setLayout(gl); |
62 |
|
63 |
GridBagConstraints gbc = new GridBagConstraints(); |
64 |
gbc.weightx = 1.0;
|
65 |
gbc.weighty = 1.0;
|
66 |
gbc.fill = GridBagConstraints.BOTH;
|
67 |
|
68 |
add(getAlgorithmSelectionPanel(), gbc); |
69 |
|
70 |
gbc.gridy = 1;
|
71 |
add(getCheckOptionsPanel(), gbc); |
72 |
} |
73 |
|
74 |
/**
|
75 |
* Obtiene el panel de selecci?n de algoritmo
|
76 |
* @return AlgorithmSelectionPanel
|
77 |
*/
|
78 |
public AlgorithmSelectionPanel getAlgorithmSelectionPanel() {
|
79 |
if(algorithmPanel == null) |
80 |
algorithmPanel = new AlgorithmSelectionPanel(polynomialDegree);
|
81 |
return algorithmPanel;
|
82 |
} |
83 |
|
84 |
/**
|
85 |
* Obtiene el panel de selecci?n de fichero
|
86 |
* @return FileSelectionPanel
|
87 |
*/
|
88 |
public CheckOptionsPanel getCheckOptionsPanel() {
|
89 |
if(checkOptionsPanel == null) |
90 |
checkOptionsPanel = new CheckOptionsPanel();
|
91 |
return checkOptionsPanel;
|
92 |
} |
93 |
} |