root / trunk / extensions / extGeoreferencing / src / com / iver / cit / gvsig / gui / Panels / ConectorPanel.java @ 3039
History | View | Annotate | Download (3.34 KB)
1 |
package com.iver.cit.gvsig.gui.Panels; |
---|---|
2 |
|
3 |
import java.awt.BorderLayout; |
4 |
import java.awt.Dimension; |
5 |
import java.awt.FlowLayout; |
6 |
import java.awt.GridBagConstraints; |
7 |
import java.awt.GridBagLayout; |
8 |
|
9 |
import javax.swing.JPanel; |
10 |
|
11 |
import com.iver.cit.gvsig.gui.Dialogs.GeoreferencingDialog; |
12 |
|
13 |
/**
|
14 |
* Panel que contiene opciones de georreferenciaci?n a elegir por
|
15 |
* el usuario. Esta clase no maneja eventos.
|
16 |
*
|
17 |
* @author Nacho Brodin (brodin_ign@gva.es)
|
18 |
*
|
19 |
*/
|
20 |
public class ConectorPanel extends JPanel{ |
21 |
|
22 |
private AdjustGeorefPanel adjustGeorefPanel = null; |
23 |
private DataPointsTabPanel dataPointsTabPanel = null; |
24 |
private GeoreferencingDialog grd = null; |
25 |
private JPanel pNorth = null; |
26 |
private JPanel pSouth = null; |
27 |
/**
|
28 |
* This is the default constructor
|
29 |
*/
|
30 |
public ConectorPanel(GeoreferencingDialog grd) {
|
31 |
super();
|
32 |
this.grd = grd;
|
33 |
initialize(); |
34 |
} |
35 |
|
36 |
/**
|
37 |
* This method initializes this
|
38 |
*
|
39 |
* @return void
|
40 |
*/
|
41 |
private void initialize() { |
42 |
GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); |
43 |
gridBagConstraints1.gridx = 0;
|
44 |
gridBagConstraints1.fill = java.awt.GridBagConstraints.NONE; |
45 |
gridBagConstraints1.anchor = java.awt.GridBagConstraints.CENTER; |
46 |
gridBagConstraints1.gridy = 1;
|
47 |
GridBagConstraints gridBagConstraints = new GridBagConstraints(); |
48 |
gridBagConstraints.gridx = 0;
|
49 |
gridBagConstraints.gridy = 0;
|
50 |
this.setLayout(new GridBagLayout()); |
51 |
this.setPreferredSize(new java.awt.Dimension(380,363)); |
52 |
this.setSize(new java.awt.Dimension(380,363)); |
53 |
this.setLocation(new java.awt.Point(0,0)); |
54 |
this.add(getPNorth(), gridBagConstraints);
|
55 |
this.add(getPSouth(), gridBagConstraints1);
|
56 |
} |
57 |
|
58 |
|
59 |
public AdjustGeorefPanel getAdjustGeorefPanel() {
|
60 |
if (adjustGeorefPanel == null) { |
61 |
adjustGeorefPanel = new AdjustGeorefPanel(grd);
|
62 |
adjustGeorefPanel.setSize(400, 275); |
63 |
adjustGeorefPanel.setPreferredSize(new Dimension(400, 275)); |
64 |
adjustGeorefPanel.setVisible(true);
|
65 |
} |
66 |
return adjustGeorefPanel;
|
67 |
} |
68 |
|
69 |
public DataPointsTabPanel getDataPointsTabPanel() {
|
70 |
if (dataPointsTabPanel == null) { |
71 |
dataPointsTabPanel = new DataPointsTabPanel(grd);
|
72 |
dataPointsTabPanel.setVisible(true);
|
73 |
} |
74 |
return dataPointsTabPanel;
|
75 |
} |
76 |
|
77 |
/**
|
78 |
* This method initializes jPanel
|
79 |
*
|
80 |
* @return javax.swing.JPanel
|
81 |
*/
|
82 |
private JPanel getPNorth() { |
83 |
if (pNorth == null) { |
84 |
BorderLayout borderLayout = new BorderLayout(); |
85 |
pNorth = new JPanel(); |
86 |
pNorth.setLayout(borderLayout); |
87 |
pNorth.setPreferredSize(new java.awt.Dimension(380,191)); |
88 |
pNorth.add(getDataPointsTabPanel(), BorderLayout.CENTER);
|
89 |
} |
90 |
return pNorth;
|
91 |
} |
92 |
|
93 |
/**
|
94 |
* This method initializes jPanel1
|
95 |
*
|
96 |
* @return javax.swing.JPanel
|
97 |
*/
|
98 |
private JPanel getPSouth() { |
99 |
if (pSouth == null) { |
100 |
BorderLayout borderLayout = new BorderLayout(); |
101 |
pSouth = new JPanel(); |
102 |
pSouth.setLayout(borderLayout); |
103 |
pSouth.setPreferredSize(new java.awt.Dimension(380,170)); |
104 |
pSouth.add(getAdjustGeorefPanel(), BorderLayout.CENTER);
|
105 |
} |
106 |
return pSouth;
|
107 |
} |
108 |
|
109 |
/**
|
110 |
* Asigna al canvas de los controles de zoom la propiedad de visibilidad a
|
111 |
* verdadero o falso.
|
112 |
* @param visible true para mostrar los canvas y false para ocultarlos
|
113 |
*/
|
114 |
public void setCanvasVisible(boolean visible){ |
115 |
this.getAdjustGeorefPanel().getZoomLeft().setVisible(visible);
|
116 |
this.getAdjustGeorefPanel().getZoomRight().setVisible(visible);
|
117 |
} |
118 |
} |