svn-gvsig-desktop / branches / org.gvsig.desktop-2018a / org.gvsig.desktop.library / org.gvsig.raster.tools / org.gvsig.raster.tools.swing / org.gvsig.raster.tools.swing.impl / src / main / java / org / gvsig / raster / tools / swing / impl / clip / ClipPanelView.java @ 43803
History | View | Annotate | Download (19.7 KB)
1 |
package org.gvsig.raster.tools.swing.impl.clip; |
---|---|
2 |
|
3 |
import com.jeta.forms.components.separator.TitledSeparator; |
4 |
import com.jeta.open.i18n.I18NUtils; |
5 |
import com.jgoodies.forms.layout.CellConstraints; |
6 |
import com.jgoodies.forms.layout.FormLayout; |
7 |
import java.awt.BorderLayout; |
8 |
import java.awt.ComponentOrientation; |
9 |
import java.awt.Container; |
10 |
import java.awt.Dimension; |
11 |
import javax.swing.Box; |
12 |
import javax.swing.ButtonGroup; |
13 |
import javax.swing.ImageIcon; |
14 |
import javax.swing.JButton; |
15 |
import javax.swing.JCheckBox; |
16 |
import javax.swing.JComboBox; |
17 |
import javax.swing.JFormattedTextField; |
18 |
import javax.swing.JFrame; |
19 |
import javax.swing.JLabel; |
20 |
import javax.swing.JPanel; |
21 |
import javax.swing.JRadioButton; |
22 |
import javax.swing.JScrollPane; |
23 |
import javax.swing.JTabbedPane; |
24 |
import javax.swing.JTable; |
25 |
import javax.swing.JTextField; |
26 |
|
27 |
|
28 |
public class ClipPanelView extends JPanel |
29 |
{ |
30 |
JTabbedPane tabClip = new JTabbedPane(); |
31 |
TitledSeparator lblPixelCoord = new TitledSeparator();
|
32 |
JLabel lblPix1X = new JLabel(); |
33 |
JLabel lblPix2X = new JLabel(); |
34 |
JLabel lblPix1Y = new JLabel(); |
35 |
JLabel lblPix2Y = new JLabel(); |
36 |
JLabel lblReal1X = new JLabel(); |
37 |
JLabel lblReal2X = new JLabel(); |
38 |
JLabel lblReal1Y = new JLabel(); |
39 |
JLabel lblReal2Y = new JLabel(); |
40 |
JLabel lblIconPix1 = new JLabel(); |
41 |
JLabel lblIconPix2 = new JLabel(); |
42 |
JLabel lblIconReal1 = new JLabel(); |
43 |
JLabel lblIconReal2 = new JLabel(); |
44 |
TitledSeparator lblRealCoord = new TitledSeparator();
|
45 |
JButton btnViewSelection = new JButton(); |
46 |
JButton btnFullLayer = new JButton(); |
47 |
JButton btnPixelsRound = new JButton(); |
48 |
JButton btnLoad = new JButton(); |
49 |
JButton btnSave = new JButton(); |
50 |
JButton btnRois = new JButton(); |
51 |
JButton btnView = new JButton(); |
52 |
JFormattedTextField txtPix2X = new JFormattedTextField(); |
53 |
JFormattedTextField txtPix1Y = new JFormattedTextField(); |
54 |
JFormattedTextField txtPix2Y = new JFormattedTextField(); |
55 |
JFormattedTextField txtPix1X = new JFormattedTextField(); |
56 |
JFormattedTextField txtReal1X = new JFormattedTextField(); |
57 |
JFormattedTextField txtReal2X = new JFormattedTextField(); |
58 |
JFormattedTextField txtReal1Y = new JFormattedTextField(); |
59 |
JFormattedTextField txtReal2Y = new JFormattedTextField(); |
60 |
JLabel lblRasterWidth = new JLabel(); |
61 |
JLabel lblCellWidth = new JLabel(); |
62 |
JLabel lblRasterHeight = new JLabel(); |
63 |
TitledSeparator lblResolutionMode = new TitledSeparator();
|
64 |
JComboBox cmbInterpolationMethod = new JComboBox(); |
65 |
TitledSeparator lblInterpolation = new TitledSeparator();
|
66 |
JRadioButton rbtnCellSize = new JRadioButton(); |
67 |
ButtonGroup buttongroup1 = new ButtonGroup(); |
68 |
JRadioButton rbtnRasterSize = new JRadioButton(); |
69 |
JFormattedTextField txtWidth = new JFormattedTextField(); |
70 |
JFormattedTextField txtHeight = new JFormattedTextField(); |
71 |
JFormattedTextField txtCellWidth = new JFormattedTextField(); |
72 |
JFormattedTextField txtCellHeight = new JFormattedTextField(); |
73 |
JLabel lblCellHeight = new JLabel(); |
74 |
JButton btnRestore = new JButton(); |
75 |
JButton btnImportCellWidthFromView = new JButton(); |
76 |
JTable tblBands = new JTable(); |
77 |
JButton btnUpBand = new JButton(); |
78 |
JButton btnDownBand = new JButton(); |
79 |
JLabel lblLayerNames = new JLabel(); |
80 |
JTextField txtLayerNames = new JTextField(); |
81 |
JCheckBox chkOnePerBand = new JCheckBox(); |
82 |
JCheckBox chkSaveTo = new JCheckBox(); |
83 |
JLabel lblFolder = new JLabel(); |
84 |
JTextField txtFolder = new JTextField(); |
85 |
JButton btnFolderChooser = new JButton(); |
86 |
|
87 |
/**
|
88 |
* Default constructor
|
89 |
*/
|
90 |
public ClipPanelView()
|
91 |
{ |
92 |
initializePanel(); |
93 |
} |
94 |
|
95 |
/**
|
96 |
* Adds fill components to empty cells in the first row and first column of the grid.
|
97 |
* This ensures that the grid spacing will be the same as shown in the designer.
|
98 |
* @param cols an array of column indices in the first row where fill components should be added.
|
99 |
* @param rows an array of row indices in the first column where fill components should be added.
|
100 |
*/
|
101 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
102 |
{ |
103 |
Dimension filler = new Dimension(10,10); |
104 |
|
105 |
boolean filled_cell_11 = false; |
106 |
CellConstraints cc = new CellConstraints();
|
107 |
if ( cols.length > 0 && rows.length > 0 ) |
108 |
{ |
109 |
if ( cols[0] == 1 && rows[0] == 1 ) |
110 |
{ |
111 |
/** add a rigid area */
|
112 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
113 |
filled_cell_11 = true;
|
114 |
} |
115 |
} |
116 |
|
117 |
for( int index = 0; index < cols.length; index++ ) |
118 |
{ |
119 |
if ( cols[index] == 1 && filled_cell_11 ) |
120 |
{ |
121 |
continue;
|
122 |
} |
123 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
124 |
} |
125 |
|
126 |
for( int index = 0; index < rows.length; index++ ) |
127 |
{ |
128 |
if ( rows[index] == 1 && filled_cell_11 ) |
129 |
{ |
130 |
continue;
|
131 |
} |
132 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
133 |
} |
134 |
|
135 |
} |
136 |
|
137 |
/**
|
138 |
* Helper method to load an image file from the CLASSPATH
|
139 |
* @param imageName the package and name of the file to load relative to the CLASSPATH
|
140 |
* @return an ImageIcon instance with the specified image file
|
141 |
* @throws IllegalArgumentException if the image resource cannot be loaded.
|
142 |
*/
|
143 |
public ImageIcon loadImage( String imageName ) |
144 |
{ |
145 |
try
|
146 |
{ |
147 |
ClassLoader classloader = getClass().getClassLoader();
|
148 |
java.net.URL url = classloader.getResource( imageName ); |
149 |
if ( url != null ) |
150 |
{ |
151 |
ImageIcon icon = new ImageIcon( url ); |
152 |
return icon;
|
153 |
} |
154 |
} |
155 |
catch( Exception e ) |
156 |
{ |
157 |
e.printStackTrace(); |
158 |
} |
159 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
160 |
} |
161 |
|
162 |
/**
|
163 |
* Method for recalculating the component orientation for
|
164 |
* right-to-left Locales.
|
165 |
* @param orientation the component orientation to be applied
|
166 |
*/
|
167 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
168 |
{ |
169 |
// Not yet implemented...
|
170 |
// I18NUtils.applyComponentOrientation(this, orientation);
|
171 |
super.applyComponentOrientation(orientation);
|
172 |
} |
173 |
|
174 |
public JPanel createPanel() |
175 |
{ |
176 |
JPanel jpanel1 = new JPanel(); |
177 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
178 |
CellConstraints cc = new CellConstraints();
|
179 |
jpanel1.setLayout(formlayout1); |
180 |
|
181 |
tabClip.setName("tabClip");
|
182 |
tabClip.addTab("_coordinates",null,createPanel1()); |
183 |
tabClip.addTab("_resolution",null,createPanel3()); |
184 |
tabClip.addTab("_bands",null,createPanel7()); |
185 |
tabClip.addTab("_other_options",null,createPanel8()); |
186 |
jpanel1.add(tabClip,new CellConstraints(2,2,1,1,CellConstraints.DEFAULT,CellConstraints.FILL)); |
187 |
|
188 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 }); |
189 |
return jpanel1;
|
190 |
} |
191 |
|
192 |
public JPanel createPanel1() |
193 |
{ |
194 |
JPanel jpanel1 = new JPanel(); |
195 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
196 |
CellConstraints cc = new CellConstraints();
|
197 |
jpanel1.setLayout(formlayout1); |
198 |
|
199 |
lblPixelCoord.setName("lblPixelCoord");
|
200 |
lblPixelCoord.setText("_pixel_coordinates");
|
201 |
jpanel1.add(lblPixelCoord,cc.xywh(2,2,9,1)); |
202 |
|
203 |
lblPix1X.setName("lblPix1X");
|
204 |
lblPix1X.setText("_columnXcolonX");
|
205 |
jpanel1.add(lblPix1X,cc.xy(4,4)); |
206 |
|
207 |
lblPix2X.setName("lblPix2X");
|
208 |
lblPix2X.setText("_columnXcolonX");
|
209 |
jpanel1.add(lblPix2X,cc.xy(4,6)); |
210 |
|
211 |
lblPix1Y.setName("lblPix1Y");
|
212 |
lblPix1Y.setText("_rowXcolonX");
|
213 |
jpanel1.add(lblPix1Y,cc.xy(8,4)); |
214 |
|
215 |
lblPix2Y.setName("lblPix2Y");
|
216 |
lblPix2Y.setText("_rowXcolonX");
|
217 |
jpanel1.add(lblPix2Y,cc.xy(8,6)); |
218 |
|
219 |
lblReal1X.setName("lblReal1X");
|
220 |
lblReal1X.setText("X:");
|
221 |
jpanel1.add(lblReal1X,cc.xy(4,10)); |
222 |
|
223 |
lblReal2X.setName("lblReal2X");
|
224 |
lblReal2X.setText("X:");
|
225 |
jpanel1.add(lblReal2X,cc.xy(4,12)); |
226 |
|
227 |
lblReal1Y.setName("lblReal1Y");
|
228 |
lblReal1Y.setText("Y:");
|
229 |
jpanel1.add(lblReal1Y,cc.xy(8,10)); |
230 |
|
231 |
lblReal2Y.setName("lblReal2Y");
|
232 |
lblReal2Y.setText("Y:");
|
233 |
jpanel1.add(lblReal2Y,cc.xy(8,12)); |
234 |
|
235 |
lblIconPix1.setName("lblIconPix1");
|
236 |
jpanel1.add(lblIconPix1,cc.xy(2,4)); |
237 |
|
238 |
lblIconPix2.setName("lblIconPix2");
|
239 |
jpanel1.add(lblIconPix2,cc.xy(2,6)); |
240 |
|
241 |
lblIconReal1.setName("lblIconReal1");
|
242 |
jpanel1.add(lblIconReal1,cc.xy(2,10)); |
243 |
|
244 |
lblIconReal2.setName("lblIconReal2");
|
245 |
jpanel1.add(lblIconReal2,cc.xy(2,12)); |
246 |
|
247 |
lblRealCoord.setName("lblRealCoord");
|
248 |
lblRealCoord.setText("_real_coordinates");
|
249 |
jpanel1.add(lblRealCoord,cc.xywh(2,8,9,1)); |
250 |
|
251 |
jpanel1.add(createPanel2(),new CellConstraints(2,14,9,1,CellConstraints.RIGHT,CellConstraints.DEFAULT)); |
252 |
txtPix2X.setName("txtPix2X");
|
253 |
jpanel1.add(txtPix2X,cc.xy(6,6)); |
254 |
|
255 |
txtPix1Y.setName("txtPix1Y");
|
256 |
jpanel1.add(txtPix1Y,cc.xy(10,4)); |
257 |
|
258 |
txtPix2Y.setName("txtPix2Y");
|
259 |
jpanel1.add(txtPix2Y,cc.xy(10,6)); |
260 |
|
261 |
txtPix1X.setName("txtPix1X");
|
262 |
jpanel1.add(txtPix1X,cc.xy(6,4)); |
263 |
|
264 |
txtReal1X.setName("txtReal1X");
|
265 |
jpanel1.add(txtReal1X,cc.xy(6,10)); |
266 |
|
267 |
txtReal2X.setName("txtReal2X");
|
268 |
jpanel1.add(txtReal2X,cc.xy(6,12)); |
269 |
|
270 |
txtReal1Y.setName("txtReal1Y");
|
271 |
jpanel1.add(txtReal1Y,cc.xy(10,10)); |
272 |
|
273 |
txtReal2Y.setName("txtReal2Y");
|
274 |
jpanel1.add(txtReal2Y,cc.xy(10,12)); |
275 |
|
276 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }); |
277 |
return jpanel1;
|
278 |
} |
279 |
|
280 |
public JPanel createPanel2() |
281 |
{ |
282 |
JPanel jpanel1 = new JPanel(); |
283 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
284 |
CellConstraints cc = new CellConstraints();
|
285 |
jpanel1.setLayout(formlayout1); |
286 |
|
287 |
btnViewSelection.setActionCommand("JButton");
|
288 |
btnViewSelection.setName("btnViewSelection");
|
289 |
btnViewSelection.setText("_view_selection");
|
290 |
btnViewSelection.setToolTipText("_view_selection");
|
291 |
jpanel1.add(btnViewSelection,cc.xy(13,1)); |
292 |
|
293 |
btnFullLayer.setActionCommand("JButton");
|
294 |
btnFullLayer.setName("btnFullLayer");
|
295 |
btnFullLayer.setText("_full_layer");
|
296 |
btnFullLayer.setToolTipText("_full_layer");
|
297 |
jpanel1.add(btnFullLayer,cc.xy(9,1)); |
298 |
|
299 |
btnPixelsRound.setActionCommand("JButton");
|
300 |
btnPixelsRound.setName("btnPixelsRound");
|
301 |
btnPixelsRound.setText("_update_envelope_from_pixels");
|
302 |
btnPixelsRound.setToolTipText("_update_envelope_from_pixels");
|
303 |
jpanel1.add(btnPixelsRound,cc.xy(5,1)); |
304 |
|
305 |
btnLoad.setActionCommand("JButton");
|
306 |
btnLoad.setName("btnLoad");
|
307 |
btnLoad.setText("_load");
|
308 |
btnLoad.setToolTipText("_load");
|
309 |
jpanel1.add(btnLoad,cc.xy(1,1)); |
310 |
|
311 |
btnSave.setActionCommand("JButton");
|
312 |
btnSave.setName("btnSave");
|
313 |
btnSave.setText("_save");
|
314 |
btnSave.setToolTipText("_save");
|
315 |
jpanel1.add(btnSave,cc.xy(3,1)); |
316 |
|
317 |
btnRois.setActionCommand("JButton");
|
318 |
btnRois.setName("btnRois");
|
319 |
btnRois.setText("_rois");
|
320 |
btnRois.setToolTipText("_rois");
|
321 |
jpanel1.add(btnRois,cc.xy(7,1)); |
322 |
|
323 |
btnView.setActionCommand("JButton");
|
324 |
btnView.setName("btnView");
|
325 |
btnView.setText("_view_extent");
|
326 |
btnView.setToolTipText("_view_extent");
|
327 |
jpanel1.add(btnView,cc.xy(11,1)); |
328 |
|
329 |
addFillComponents(jpanel1,new int[]{ 2,4,6,8,10,12 },new int[0]); |
330 |
return jpanel1;
|
331 |
} |
332 |
|
333 |
public JPanel createPanel3() |
334 |
{ |
335 |
JPanel jpanel1 = new JPanel(); |
336 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
337 |
CellConstraints cc = new CellConstraints();
|
338 |
jpanel1.setLayout(formlayout1); |
339 |
|
340 |
lblRasterWidth.setEnabled(false);
|
341 |
lblRasterWidth.setName("lblRasterWidth");
|
342 |
lblRasterWidth.setText("_raster_width");
|
343 |
jpanel1.add(lblRasterWidth,cc.xy(2,12)); |
344 |
|
345 |
lblCellWidth.setName("lblCellWidth");
|
346 |
lblCellWidth.setText("_cell_width");
|
347 |
jpanel1.add(lblCellWidth,cc.xy(2,8)); |
348 |
|
349 |
lblRasterHeight.setEnabled(false);
|
350 |
lblRasterHeight.setName("lblRasterHeight");
|
351 |
lblRasterHeight.setText("_raster_height");
|
352 |
jpanel1.add(lblRasterHeight,cc.xy(2,14)); |
353 |
|
354 |
lblResolutionMode.setName("lblResolutionMode");
|
355 |
lblResolutionMode.setText("_resolution_selection_mode");
|
356 |
lblResolutionMode.setToolTipText("_resolution_selection_mode");
|
357 |
jpanel1.add(lblResolutionMode,cc.xywh(2,2,3,1)); |
358 |
|
359 |
jpanel1.add(createPanel4(),cc.xywh(2,6,3,1)); |
360 |
jpanel1.add(createPanel5(),cc.xywh(2,4,3,1)); |
361 |
txtWidth.setEnabled(false);
|
362 |
txtWidth.setName("txtWidth");
|
363 |
jpanel1.add(txtWidth,cc.xy(4,12)); |
364 |
|
365 |
txtHeight.setEnabled(false);
|
366 |
txtHeight.setName("txtHeight");
|
367 |
jpanel1.add(txtHeight,cc.xy(4,14)); |
368 |
|
369 |
txtCellWidth.setName("txtCellWidth");
|
370 |
jpanel1.add(txtCellWidth,cc.xy(4,8)); |
371 |
|
372 |
txtCellHeight.setName("txtCellHeight");
|
373 |
jpanel1.add(txtCellHeight,cc.xy(4,10)); |
374 |
|
375 |
lblCellHeight.setName("lblCellHeight");
|
376 |
lblCellHeight.setText("_cell_height");
|
377 |
jpanel1.add(lblCellHeight,cc.xy(2,10)); |
378 |
|
379 |
jpanel1.add(createPanel6(),cc.xy(4,16)); |
380 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17 }); |
381 |
return jpanel1;
|
382 |
} |
383 |
|
384 |
public JPanel createPanel4() |
385 |
{ |
386 |
JPanel jpanel1 = new JPanel(); |
387 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
388 |
CellConstraints cc = new CellConstraints();
|
389 |
jpanel1.setLayout(formlayout1); |
390 |
|
391 |
cmbInterpolationMethod.setName("cmbInterpolationMethod");
|
392 |
jpanel1.add(cmbInterpolationMethod,cc.xy(3,1)); |
393 |
|
394 |
lblInterpolation.setName("lblInterpolation");
|
395 |
lblInterpolation.setText("_interpolation_method");
|
396 |
jpanel1.add(lblInterpolation,cc.xy(1,1)); |
397 |
|
398 |
addFillComponents(jpanel1,new int[]{ 2 },new int[0]); |
399 |
return jpanel1;
|
400 |
} |
401 |
|
402 |
public JPanel createPanel5() |
403 |
{ |
404 |
JPanel jpanel1 = new JPanel(); |
405 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
406 |
CellConstraints cc = new CellConstraints();
|
407 |
jpanel1.setLayout(formlayout1); |
408 |
|
409 |
rbtnCellSize.setActionCommand("JRadioButton");
|
410 |
rbtnCellSize.setName("rbtnCellSize");
|
411 |
rbtnCellSize.setSelected(true);
|
412 |
rbtnCellSize.setText("_cell_size");
|
413 |
buttongroup1.add(rbtnCellSize); |
414 |
jpanel1.add(rbtnCellSize,cc.xy(1,1)); |
415 |
|
416 |
rbtnRasterSize.setActionCommand("JRadioButton");
|
417 |
rbtnRasterSize.setName("rbtnRasterSize");
|
418 |
rbtnRasterSize.setText("_raster_size");
|
419 |
rbtnRasterSize.setToolTipText("_raster_size");
|
420 |
buttongroup1.add(rbtnRasterSize); |
421 |
jpanel1.add(rbtnRasterSize,cc.xy(1,3)); |
422 |
|
423 |
addFillComponents(jpanel1,new int[0],new int[]{ 2 }); |
424 |
return jpanel1;
|
425 |
} |
426 |
|
427 |
public JPanel createPanel6() |
428 |
{ |
429 |
JPanel jpanel1 = new JPanel(); |
430 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
431 |
CellConstraints cc = new CellConstraints();
|
432 |
jpanel1.setLayout(formlayout1); |
433 |
|
434 |
btnRestore.setActionCommand("JButton");
|
435 |
btnRestore.setName("btnRestore");
|
436 |
btnRestore.setText("_restore");
|
437 |
btnRestore.setToolTipText("_restore");
|
438 |
jpanel1.add(btnRestore,cc.xy(4,1)); |
439 |
|
440 |
btnImportCellWidthFromView.setActionCommand("_import_cell_width_from_view");
|
441 |
btnImportCellWidthFromView.setName("btnImportCellWidthFromView");
|
442 |
btnImportCellWidthFromView.setText("_import_cell_width_from_view");
|
443 |
jpanel1.add(btnImportCellWidthFromView,cc.xy(2,1)); |
444 |
|
445 |
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1 }); |
446 |
return jpanel1;
|
447 |
} |
448 |
|
449 |
public JPanel createPanel7() |
450 |
{ |
451 |
JPanel jpanel1 = new JPanel(); |
452 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
453 |
CellConstraints cc = new CellConstraints();
|
454 |
jpanel1.setLayout(formlayout1); |
455 |
|
456 |
tblBands.setName("tblBands");
|
457 |
JScrollPane jscrollpane1 = new JScrollPane(); |
458 |
jscrollpane1.setViewportView(tblBands); |
459 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
460 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
461 |
jpanel1.add(jscrollpane1,cc.xywh(2,2,5,1)); |
462 |
|
463 |
btnUpBand.setActionCommand("_up");
|
464 |
btnUpBand.setName("btnUpBand");
|
465 |
btnUpBand.setText("_up");
|
466 |
btnUpBand.setToolTipText("_up");
|
467 |
jpanel1.add(btnUpBand,cc.xy(3,4)); |
468 |
|
469 |
btnDownBand.setActionCommand("_down");
|
470 |
btnDownBand.setName("btnDownBand");
|
471 |
btnDownBand.setText("_down");
|
472 |
btnDownBand.setToolTipText("_down");
|
473 |
jpanel1.add(btnDownBand,cc.xy(5,4)); |
474 |
|
475 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5 }); |
476 |
return jpanel1;
|
477 |
} |
478 |
|
479 |
public JPanel createPanel8() |
480 |
{ |
481 |
JPanel jpanel1 = new JPanel(); |
482 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
483 |
CellConstraints cc = new CellConstraints();
|
484 |
jpanel1.setLayout(formlayout1); |
485 |
|
486 |
lblLayerNames.setName("lblLayerNames");
|
487 |
lblLayerNames.setText("_layers_names");
|
488 |
jpanel1.add(lblLayerNames,cc.xy(2,2)); |
489 |
|
490 |
txtLayerNames.setName("txtLayerNames");
|
491 |
jpanel1.add(txtLayerNames,cc.xywh(4,2,3,1)); |
492 |
|
493 |
chkOnePerBand.setActionCommand("_one_layer_per_band");
|
494 |
chkOnePerBand.setName("chkOnePerBand");
|
495 |
chkOnePerBand.setText("_one_layer_per_band");
|
496 |
jpanel1.add(chkOnePerBand,cc.xywh(2,4,5,1)); |
497 |
|
498 |
chkSaveTo.setActionCommand("_save_to");
|
499 |
chkSaveTo.setName("chkSaveTo");
|
500 |
chkSaveTo.setText("_save_to");
|
501 |
jpanel1.add(chkSaveTo,cc.xywh(2,6,5,1)); |
502 |
|
503 |
lblFolder.setEnabled(false);
|
504 |
lblFolder.setName("lblFolder");
|
505 |
lblFolder.setText("_folder");
|
506 |
jpanel1.add(lblFolder,cc.xy(2,8)); |
507 |
|
508 |
txtFolder.setEnabled(false);
|
509 |
txtFolder.setName("txtFolder");
|
510 |
jpanel1.add(txtFolder,cc.xy(4,8)); |
511 |
|
512 |
btnFolderChooser.setActionCommand("...");
|
513 |
btnFolderChooser.setEnabled(false);
|
514 |
btnFolderChooser.setName("btnFolderChooser");
|
515 |
btnFolderChooser.setText("...");
|
516 |
btnFolderChooser.setToolTipText("_folder_selection");
|
517 |
jpanel1.add(btnFolderChooser,cc.xy(6,8)); |
518 |
|
519 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
520 |
return jpanel1;
|
521 |
} |
522 |
|
523 |
/**
|
524 |
* Initializer
|
525 |
*/
|
526 |
protected void initializePanel() |
527 |
{ |
528 |
setLayout(new BorderLayout()); |
529 |
add(createPanel(), BorderLayout.CENTER);
|
530 |
} |
531 |
|
532 |
|
533 |
} |