root / trunk / extensions / extGeoreferencing / src / org / gvsig / georeferencing / ui / options / GeorefOptionsPanel.java @ 19621
History | View | Annotate | Download (3.73 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.georeferencing.ui.launcher.OutFileSelectionPanel; |
26 |
import org.gvsig.gui.beans.buttonspanel.ButtonsPanelListener; |
27 |
import org.gvsig.gui.beans.defaultbuttonspanel.DefaultButtonsPanel; |
28 |
|
29 |
/**
|
30 |
* Panel general de opciones de georreferenciaci?n. Consta de dos paneles principales,
|
31 |
* el de selecci?n de algoritmo y el de selecci?n de opciones.
|
32 |
*
|
33 |
* 10/01/2008
|
34 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
35 |
*/
|
36 |
public class GeorefOptionsPanel extends DefaultButtonsPanel { |
37 |
private static final long serialVersionUID = 1L; |
38 |
private int polynomialDegree; |
39 |
|
40 |
private AlgorithmSelectionPanel algorithmPanel = null; |
41 |
private CheckOptionsPanel checkOptionsPanel = null; |
42 |
private OutFileSelectionPanel outFilePanel = null; |
43 |
private CellSizeOptionsPanel cellSizePanel = null; |
44 |
|
45 |
/**
|
46 |
* Constructor
|
47 |
* @param viewList Lista de nombres de las vistas disponibles
|
48 |
* @param degreeList grado m?ximo para la georreferenciaci?n polinomial
|
49 |
*/
|
50 |
public GeorefOptionsPanel(int polynomialDegree, ButtonsPanelListener listener) { |
51 |
this.polynomialDegree = polynomialDegree;
|
52 |
|
53 |
//Ocultamos el bot?n de aplicar
|
54 |
getButtonsPanel().addButtonPressedListener(listener); |
55 |
init(); |
56 |
} |
57 |
|
58 |
/**
|
59 |
* Acciones de inicializaci?n del panel
|
60 |
*/
|
61 |
public void init() { |
62 |
GridBagLayout gl = new GridBagLayout(); |
63 |
setLayout(gl); |
64 |
|
65 |
GridBagConstraints gbc = new GridBagConstraints(); |
66 |
gbc.weightx = 1.0;
|
67 |
gbc.weighty = 1.0;
|
68 |
gbc.fill = GridBagConstraints.BOTH;
|
69 |
|
70 |
add(getAlgorithmSelectionPanel(), gbc); |
71 |
|
72 |
gbc.gridy = 1;
|
73 |
add(getOutFileSelectionPanel(), gbc); |
74 |
|
75 |
gbc.gridy = 2;
|
76 |
add(getCheckOptionsPanel(), gbc); |
77 |
|
78 |
gbc.gridy = 3;
|
79 |
add(getCellSizePanel(), gbc); |
80 |
} |
81 |
|
82 |
/**
|
83 |
* Obtiene el panel de selecci?n de algoritmo
|
84 |
* @return AlgorithmSelectionPanel
|
85 |
*/
|
86 |
public AlgorithmSelectionPanel getAlgorithmSelectionPanel() {
|
87 |
if(algorithmPanel == null) |
88 |
algorithmPanel = new AlgorithmSelectionPanel(polynomialDegree);
|
89 |
return algorithmPanel;
|
90 |
} |
91 |
|
92 |
/**
|
93 |
* Obtiene el panel de selecci?n de fichero
|
94 |
* @return FileSelectionPanel
|
95 |
*/
|
96 |
public CheckOptionsPanel getCheckOptionsPanel() {
|
97 |
if(checkOptionsPanel == null) |
98 |
checkOptionsPanel = new CheckOptionsPanel();
|
99 |
return checkOptionsPanel;
|
100 |
} |
101 |
|
102 |
/**
|
103 |
* Obtiene el panel de selecci?n de fichero de salida
|
104 |
* @return FileSelectionPanel
|
105 |
*/
|
106 |
public OutFileSelectionPanel getOutFileSelectionPanel() {
|
107 |
if(outFilePanel == null) |
108 |
outFilePanel = new OutFileSelectionPanel();
|
109 |
return outFilePanel;
|
110 |
} |
111 |
|
112 |
/**
|
113 |
* Obtiene el panel del tama?o de celda
|
114 |
* @return CellSizeOptionsPanel
|
115 |
*/
|
116 |
public CellSizeOptionsPanel getCellSizePanel() {
|
117 |
if(cellSizePanel == null) |
118 |
cellSizePanel = new CellSizeOptionsPanel();
|
119 |
return cellSizePanel;
|
120 |
} |
121 |
} |