svn-gvsig-desktop / trunk / extensions / extRasterTools / src / com / iver / cit / gvsig / rasterTools / saveRaster / pruebas2 / SaveRasterControlsPanel.java @ 4441
History | View | Annotate | Download (5.76 KB)
1 |
package com.iver.cit.gvsig.rasterTools.saveRaster.pruebas2; |
---|---|
2 |
|
3 |
import java.awt.GridBagConstraints; |
4 |
import java.awt.GridBagLayout; |
5 |
|
6 |
import javax.swing.JPanel; |
7 |
|
8 |
import org.cresques.cts.IProjection; |
9 |
import org.cresques.io.GeoRasterWriter; |
10 |
|
11 |
import com.iver.andami.PluginServices; |
12 |
import com.iver.cit.gvsig.fmap.MapControl; |
13 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
14 |
import com.iver.cit.gvsig.rasterTools.saveRaster.DriverProperties; |
15 |
import com.iver.cit.gvsig.rasterTools.saveRaster.gui.SaveRasterPropsDialog; |
16 |
|
17 |
/**
|
18 |
* Panel General de salvar a raster
|
19 |
* @author Nacho Brodin (brodin_ign@gva.es)
|
20 |
*
|
21 |
*/
|
22 |
public class SaveRasterControlsPanel extends JPanel { |
23 |
|
24 |
//Panels
|
25 |
private JPanel pWorldCoordinates = null; |
26 |
private JPanel pMethod = null; |
27 |
private JPanel pButtons = null; |
28 |
private JPanel pInfDer = null; |
29 |
private JPanel pSupIzq = null; |
30 |
|
31 |
/**
|
32 |
* This is the default constructor
|
33 |
*/
|
34 |
public SaveRasterControlsPanel() {
|
35 |
super();
|
36 |
initialize(); |
37 |
} |
38 |
|
39 |
/**
|
40 |
* Asigna las traducciones del dialogo
|
41 |
*/
|
42 |
public void setTranslation(){ |
43 |
MethodDataInputPanel method = ((MethodDataInputPanel)pMethod); |
44 |
InputScaleDataPanel scaleData = ((InputScaleDataPanel)method.getPEast()); |
45 |
scaleData.getLScale().setText(PluginServices.getText(this,"scale")); |
46 |
scaleData.getLResolution().setText(PluginServices.getText(this,"resolution")); |
47 |
scaleData.getLMtsPixel().setText(PluginServices.getText(this,"mtspixel")); |
48 |
|
49 |
MethodSaveRasterSelectorPanel selector = ((MethodSaveRasterSelectorPanel)method.getPWest()); |
50 |
selector.getRbMtsPixel().setText(PluginServices.getText(this,"mtspixel")); |
51 |
selector.getRbSize().setText(PluginServices.getText(this,"size")); |
52 |
selector.getRbScale().setText(PluginServices.getText(this,"scale")); |
53 |
|
54 |
InputSizeDataPanel size = ((InputSizeDataPanel)method.getPSouth()); |
55 |
size.getLHeight().setText(PluginServices.getText(this,"height")); |
56 |
size.getLWidth().setText(PluginServices.getText(this,"width")); |
57 |
|
58 |
ButtonsPanel but = ((ButtonsPanel)pButtons); |
59 |
but.setTag(PluginServices.getText(this,"file")); |
60 |
but.getBSelect().setText(PluginServices.getText(this,"select")); |
61 |
((DoubleJTextInputPanel)pInfDer).setTexts( PluginServices.getText(this,"linf_der"), |
62 |
PluginServices.getText(this," X: "), |
63 |
PluginServices.getText(this," Y: ")); |
64 |
((DoubleJTextInputPanel)pSupIzq).setTexts( PluginServices.getText(this,"lsup_izq"), |
65 |
PluginServices.getText(this," X: "), |
66 |
PluginServices.getText(this," Y: ")); |
67 |
} |
68 |
|
69 |
/**
|
70 |
* This method initializes this
|
71 |
*
|
72 |
* @return void
|
73 |
*/
|
74 |
private void initialize() { |
75 |
GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); |
76 |
gridBagConstraints2.gridx = 0;
|
77 |
gridBagConstraints2.insets = new java.awt.Insets(3,0,0,0); |
78 |
gridBagConstraints2.gridy = 2;
|
79 |
GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); |
80 |
gridBagConstraints1.gridx = 0;
|
81 |
gridBagConstraints1.insets = new java.awt.Insets(0,0,0,0); |
82 |
gridBagConstraints1.gridy = 1;
|
83 |
GridBagConstraints gridBagConstraints = new GridBagConstraints(); |
84 |
gridBagConstraints.gridx = 0;
|
85 |
gridBagConstraints.insets = new java.awt.Insets(0,0,3,0); |
86 |
gridBagConstraints.gridy = 0;
|
87 |
this.setLayout(new GridBagLayout()); |
88 |
this.setSize(341, 232); |
89 |
this.add(getPWorldCoordinates(), gridBagConstraints);
|
90 |
this.add(getPMethod(), gridBagConstraints1);
|
91 |
this.add(getPButtons(), gridBagConstraints2);
|
92 |
this.setTranslation();
|
93 |
} |
94 |
|
95 |
/**
|
96 |
* This method initializes jPanel
|
97 |
*
|
98 |
* @return javax.swing.JPanel
|
99 |
*/
|
100 |
private JPanel getPWorldCoordinates() { |
101 |
if (pWorldCoordinates == null) { |
102 |
GridBagConstraints gridBagConstraints5 = new GridBagConstraints(); |
103 |
gridBagConstraints5.gridx = 0;
|
104 |
gridBagConstraints5.gridy = 0;
|
105 |
GridBagConstraints gridBagConstraints4 = new GridBagConstraints(); |
106 |
gridBagConstraints4.gridx = 0;
|
107 |
gridBagConstraints4.gridy = 0;
|
108 |
GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); |
109 |
gridBagConstraints3.gridx = 0;
|
110 |
gridBagConstraints3.gridy = 1;
|
111 |
pWorldCoordinates = new JPanel(); |
112 |
pWorldCoordinates.setLayout(new GridBagLayout()); |
113 |
pWorldCoordinates.setPreferredSize(new java.awt.Dimension(341,46)); |
114 |
pWorldCoordinates.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray,1));
|
115 |
pWorldCoordinates.add(getPInfDer(), gridBagConstraints3); |
116 |
pWorldCoordinates.add(getPSupIzq(), gridBagConstraints5); |
117 |
} |
118 |
return pWorldCoordinates;
|
119 |
} |
120 |
|
121 |
/**
|
122 |
* This method initializes jPanel1
|
123 |
*
|
124 |
* @return javax.swing.JPanel
|
125 |
*/
|
126 |
private JPanel getPMethod() { |
127 |
if (pMethod == null) { |
128 |
pMethod = new MethodDataInputPanel();
|
129 |
pMethod.setPreferredSize(new java.awt.Dimension(341,126)); |
130 |
pMethod.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray,1));
|
131 |
} |
132 |
return pMethod;
|
133 |
} |
134 |
|
135 |
/**
|
136 |
* This method initializes jPanel2
|
137 |
*
|
138 |
* @return javax.swing.JPanel
|
139 |
*/
|
140 |
private JPanel getPButtons() { |
141 |
if (pButtons == null) { |
142 |
pButtons = new ButtonsPanel();
|
143 |
pButtons.setPreferredSize(new java.awt.Dimension(341,54)); |
144 |
pButtons.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray,1));
|
145 |
} |
146 |
return pButtons;
|
147 |
} |
148 |
|
149 |
/**
|
150 |
* This method initializes jPanel
|
151 |
*
|
152 |
* @return javax.swing.JPanel
|
153 |
*/
|
154 |
private JPanel getPInfDer() { |
155 |
if (pInfDer == null) { |
156 |
pInfDer = new DoubleJTextInputPanel();
|
157 |
((DoubleJTextInputPanel)pInfDer).setWidthText1(105);
|
158 |
((DoubleJTextInputPanel)pInfDer).setWidthText2(105);
|
159 |
pInfDer.setPreferredSize(new java.awt.Dimension(337,21)); |
160 |
} |
161 |
return pInfDer;
|
162 |
} |
163 |
|
164 |
/**
|
165 |
* This method initializes jPanel1
|
166 |
*
|
167 |
* @return javax.swing.JPanel
|
168 |
*/
|
169 |
private JPanel getPSupIzq() { |
170 |
if (pSupIzq == null) { |
171 |
pSupIzq = new DoubleJTextInputPanel();
|
172 |
((DoubleJTextInputPanel)pSupIzq).setWidthText1(105);
|
173 |
((DoubleJTextInputPanel)pSupIzq).setWidthText2(105);
|
174 |
pSupIzq.setPreferredSize(new java.awt.Dimension(337,21)); |
175 |
} |
176 |
return pSupIzq;
|
177 |
} |
178 |
|
179 |
} |