Statistics
| Revision:

gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster.2.4 / 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 @ 6659

History | View | Annotate | Download (19.6 KB)

1
package org.gvsig.raster.tools.swing.impl.clip;
2

    
3
import com.jeta.forms.components.separator.TitledSeparator;
4
import com.jgoodies.forms.layout.CellConstraints;
5
import com.jgoodies.forms.layout.FormLayout;
6
import java.awt.BorderLayout;
7
import java.awt.ComponentOrientation;
8
import java.awt.Container;
9
import java.awt.Dimension;
10
import javax.swing.Box;
11
import javax.swing.ButtonGroup;
12
import javax.swing.ImageIcon;
13
import javax.swing.JButton;
14
import javax.swing.JCheckBox;
15
import javax.swing.JComboBox;
16
import javax.swing.JFormattedTextField;
17
import javax.swing.JFrame;
18
import javax.swing.JLabel;
19
import javax.swing.JPanel;
20
import javax.swing.JRadioButton;
21
import javax.swing.JScrollPane;
22
import javax.swing.JTabbedPane;
23
import javax.swing.JTable;
24
import javax.swing.JTextField;
25

    
26

    
27
public class ClipPanelView extends JPanel
28
{
29
   JTabbedPane tabClip = new JTabbedPane();
30
   TitledSeparator lblPixelCoord = new TitledSeparator();
31
   JLabel lblPix1X = new JLabel();
32
   JLabel lblPix2X = new JLabel();
33
   JLabel lblPix1Y = new JLabel();
34
   JLabel lblPix2Y = new JLabel();
35
   JLabel lblReal1X = new JLabel();
36
   JLabel lblReal2X = new JLabel();
37
   JLabel lblReal1Y = new JLabel();
38
   JLabel lblReal2Y = new JLabel();
39
   JLabel lblIconPix1 = new JLabel();
40
   JLabel lblIconPix2 = new JLabel();
41
   JLabel lblIconReal1 = new JLabel();
42
   JLabel lblIconReal2 = new JLabel();
43
   TitledSeparator lblRealCoord = new TitledSeparator();
44
   JButton btnViewSelection = new JButton();
45
   JButton btnFullLayer = new JButton();
46
   JButton btnPixelsRound = new JButton();
47
   JButton btnLoad = new JButton();
48
   JButton btnSave = new JButton();
49
   JButton btnRois = new JButton();
50
   JFormattedTextField txtPix2X = new JFormattedTextField();
51
   JFormattedTextField txtPix1Y = new JFormattedTextField();
52
   JFormattedTextField txtPix2Y = new JFormattedTextField();
53
   JFormattedTextField txtPix1X = new JFormattedTextField();
54
   JFormattedTextField txtReal1X = new JFormattedTextField();
55
   JFormattedTextField txtReal2X = new JFormattedTextField();
56
   JFormattedTextField txtReal1Y = new JFormattedTextField();
57
   JFormattedTextField txtReal2Y = new JFormattedTextField();
58
   JLabel lblWidth = new JLabel();
59
   JLabel lblCellWidth = new JLabel();
60
   JLabel lblHeight = new JLabel();
61
   JButton btnRestore = new JButton();
62
   TitledSeparator lblResolutionMode = new TitledSeparator();
63
   JComboBox cmbInterpolationMethod = new JComboBox();
64
   TitledSeparator lblInterpolation = new TitledSeparator();
65
   JRadioButton rbtnCellSize = new JRadioButton();
66
   ButtonGroup buttongroup1 = new ButtonGroup();
67
   JRadioButton rbtnWxH = new JRadioButton();
68
   JFormattedTextField txtWidth = new JFormattedTextField();
69
   JFormattedTextField txtHeight = new JFormattedTextField();
70
   JFormattedTextField txtCellWidth = new JFormattedTextField();
71
   JFormattedTextField txtCellHeight = new JFormattedTextField();
72
   JLabel lblCellHeight = new JLabel();
73
   JTable tblBands = new JTable();
74
   JButton btnUpBand = new JButton();
75
   JButton btnDownBand = new JButton();
76
   JLabel lblLayerNames = new JLabel();
77
   JTextField txtLayerNames = new JTextField();
78
   JCheckBox chkOnePerBand = new JCheckBox();
79
   JCheckBox chkSaveTo = new JCheckBox();
80
   JLabel lblFolder = new JLabel();
81
   JTextField txtFolder = new JTextField();
82
   JButton btnFolderChooser = new JButton();
83
   JButton btnApply = new JButton();
84
   JButton btnAccept = new JButton();
85
   JButton btnCancel = 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:DEFAULT:NONE,CENTER:DEFAULT:NONE,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,createPanel6());
185
      tabClip.addTab("_other_options",null,createPanel7());
186
      jpanel1.add(tabClip,new CellConstraints(2,2,1,1,CellConstraints.DEFAULT,CellConstraints.FILL));
187

    
188
      jpanel1.add(createPanel8(),new CellConstraints(2,4,1,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));
189
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5 });
190
      return jpanel1;
191
   }
192

    
193
   public JPanel createPanel1()
194
   {
195
      JPanel jpanel1 = new JPanel();
196
      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");
197
      CellConstraints cc = new CellConstraints();
198
      jpanel1.setLayout(formlayout1);
199

    
200
      lblPixelCoord.setName("lblPixelCoord");
201
      lblPixelCoord.setText("_pixel_coordinates");
202
      jpanel1.add(lblPixelCoord,cc.xywh(2,2,9,1));
203

    
204
      lblPix1X.setName("lblPix1X");
205
      lblPix1X.setText("_columnXcolonX");
206
      jpanel1.add(lblPix1X,cc.xy(4,4));
207

    
208
      lblPix2X.setName("lblPix2X");
209
      lblPix2X.setText("_columnXcolonX");
210
      jpanel1.add(lblPix2X,cc.xy(4,6));
211

    
212
      lblPix1Y.setName("lblPix1Y");
213
      lblPix1Y.setText("_rowXcolonX");
214
      jpanel1.add(lblPix1Y,cc.xy(8,4));
215

    
216
      lblPix2Y.setName("lblPix2Y");
217
      lblPix2Y.setText("_rowXcolonX");
218
      jpanel1.add(lblPix2Y,cc.xy(8,6));
219

    
220
      lblReal1X.setName("lblReal1X");
221
      lblReal1X.setText("X:");
222
      jpanel1.add(lblReal1X,cc.xy(4,10));
223

    
224
      lblReal2X.setName("lblReal2X");
225
      lblReal2X.setText("X:");
226
      jpanel1.add(lblReal2X,cc.xy(4,12));
227

    
228
      lblReal1Y.setName("lblReal1Y");
229
      lblReal1Y.setText("Y:");
230
      jpanel1.add(lblReal1Y,cc.xy(8,10));
231

    
232
      lblReal2Y.setName("lblReal2Y");
233
      lblReal2Y.setText("Y:");
234
      jpanel1.add(lblReal2Y,cc.xy(8,12));
235

    
236
      lblIconPix1.setName("lblIconPix1");
237
      jpanel1.add(lblIconPix1,cc.xy(2,4));
238

    
239
      lblIconPix2.setName("lblIconPix2");
240
      jpanel1.add(lblIconPix2,cc.xy(2,6));
241

    
242
      lblIconReal1.setName("lblIconReal1");
243
      jpanel1.add(lblIconReal1,cc.xy(2,10));
244

    
245
      lblIconReal2.setName("lblIconReal2");
246
      jpanel1.add(lblIconReal2,cc.xy(2,12));
247

    
248
      lblRealCoord.setName("lblRealCoord");
249
      lblRealCoord.setText("_real_coordinates");
250
      jpanel1.add(lblRealCoord,cc.xywh(2,8,9,1));
251

    
252
      jpanel1.add(createPanel2(),new CellConstraints(2,14,9,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));
253
      txtPix2X.setName("txtPix2X");
254
      jpanel1.add(txtPix2X,cc.xy(6,6));
255

    
256
      txtPix1Y.setName("txtPix1Y");
257
      jpanel1.add(txtPix1Y,cc.xy(10,4));
258

    
259
      txtPix2Y.setName("txtPix2Y");
260
      jpanel1.add(txtPix2Y,cc.xy(10,6));
261

    
262
      txtPix1X.setName("txtPix1X");
263
      jpanel1.add(txtPix1X,cc.xy(6,4));
264

    
265
      txtReal1X.setName("txtReal1X");
266
      jpanel1.add(txtReal1X,cc.xy(6,10));
267

    
268
      txtReal2X.setName("txtReal2X");
269
      jpanel1.add(txtReal2X,cc.xy(6,12));
270

    
271
      txtReal1Y.setName("txtReal1Y");
272
      jpanel1.add(txtReal1Y,cc.xy(10,10));
273

    
274
      txtReal2Y.setName("txtReal2Y");
275
      jpanel1.add(txtReal2Y,cc.xy(10,12));
276

    
277
      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 });
278
      return jpanel1;
279
   }
280

    
281
   public JPanel createPanel2()
282
   {
283
      JPanel jpanel1 = new JPanel();
284
      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","CENTER:DEFAULT:NONE");
285
      CellConstraints cc = new CellConstraints();
286
      jpanel1.setLayout(formlayout1);
287

    
288
      btnViewSelection.setActionCommand("JButton");
289
      btnViewSelection.setName("btnViewSelection");
290
      btnViewSelection.setText("_view_selection");
291
      btnViewSelection.setToolTipText("_view_selection");
292
      jpanel1.add(btnViewSelection,cc.xy(11,1));
293

    
294
      btnFullLayer.setActionCommand("JButton");
295
      btnFullLayer.setName("btnFullLayer");
296
      btnFullLayer.setText("_full_layer");
297
      btnFullLayer.setToolTipText("_full_layer");
298
      jpanel1.add(btnFullLayer,cc.xy(9,1));
299

    
300
      btnPixelsRound.setActionCommand("JButton");
301
      btnPixelsRound.setName("btnPixelsRound");
302
      btnPixelsRound.setText("_update_envelope_from_pixels");
303
      btnPixelsRound.setToolTipText("_update_envelope_from_pixels");
304
      jpanel1.add(btnPixelsRound,cc.xy(5,1));
305

    
306
      btnLoad.setActionCommand("JButton");
307
      btnLoad.setName("btnLoad");
308
      btnLoad.setText("_load");
309
      btnLoad.setToolTipText("_load");
310
      jpanel1.add(btnLoad,cc.xy(1,1));
311

    
312
      btnSave.setActionCommand("JButton");
313
      btnSave.setName("btnSave");
314
      btnSave.setText("_save");
315
      btnSave.setToolTipText("_save");
316
      jpanel1.add(btnSave,cc.xy(3,1));
317

    
318
      btnRois.setActionCommand("JButton");
319
      btnRois.setName("btnRois");
320
      btnRois.setText("_rois");
321
      btnRois.setToolTipText("_rois");
322
      jpanel1.add(btnRois,cc.xy(7,1));
323

    
324
      addFillComponents(jpanel1,new int[]{ 2,4,6,8,10 },new int[0]);
325
      return jpanel1;
326
   }
327

    
328
   public JPanel createPanel3()
329
   {
330
      JPanel jpanel1 = new JPanel();
331
      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");
332
      CellConstraints cc = new CellConstraints();
333
      jpanel1.setLayout(formlayout1);
334

    
335
      lblWidth.setEnabled(false);
336
      lblWidth.setName("lblWidth");
337
      lblWidth.setText("_width");
338
      jpanel1.add(lblWidth,cc.xy(2,12));
339

    
340
      lblCellWidth.setName("lblCellWidth");
341
      lblCellWidth.setText("_cell_width");
342
      jpanel1.add(lblCellWidth,cc.xy(2,8));
343

    
344
      lblHeight.setEnabled(false);
345
      lblHeight.setName("lblHeight");
346
      lblHeight.setText("_height");
347
      jpanel1.add(lblHeight,cc.xy(2,14));
348

    
349
      btnRestore.setActionCommand("JButton");
350
      btnRestore.setName("btnRestore");
351
      btnRestore.setText("_restore");
352
      btnRestore.setToolTipText("_restore");
353
      jpanel1.add(btnRestore,new CellConstraints(4,16,1,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));
354

    
355
      lblResolutionMode.setName("lblResolutionMode");
356
      lblResolutionMode.setText("_resolution_selection_mode");
357
      lblResolutionMode.setToolTipText("_resolution_selection_mode");
358
      jpanel1.add(lblResolutionMode,cc.xywh(2,2,3,1));
359

    
360
      jpanel1.add(createPanel4(),cc.xywh(2,6,3,1));
361
      jpanel1.add(createPanel5(),cc.xywh(2,4,3,1));
362
      txtWidth.setEnabled(false);
363
      txtWidth.setName("txtWidth");
364
      jpanel1.add(txtWidth,cc.xy(4,12));
365

    
366
      txtHeight.setEnabled(false);
367
      txtHeight.setName("txtHeight");
368
      jpanel1.add(txtHeight,cc.xy(4,14));
369

    
370
      txtCellWidth.setName("txtCellWidth");
371
      jpanel1.add(txtCellWidth,cc.xy(4,8));
372

    
373
      txtCellHeight.setName("txtCellHeight");
374
      jpanel1.add(txtCellHeight,cc.xy(4,10));
375

    
376
      lblCellHeight.setName("lblCellHeight");
377
      lblCellHeight.setText("_cell_height");
378
      jpanel1.add(lblCellHeight,cc.xy(2,10));
379

    
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
      rbtnWxH.setActionCommand("JRadioButton");
417
      rbtnWxH.setName("rbtnWxH");
418
      rbtnWxH.setText("_width_x_height");
419
      rbtnWxH.setToolTipText("_width_x_height");
420
      buttongroup1.add(rbtnWxH);
421
      jpanel1.add(rbtnWxH,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: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");
431
      CellConstraints cc = new CellConstraints();
432
      jpanel1.setLayout(formlayout1);
433

    
434
      tblBands.setName("tblBands");
435
      JScrollPane jscrollpane1 = new JScrollPane();
436
      jscrollpane1.setViewportView(tblBands);
437
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
438
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
439
      jpanel1.add(jscrollpane1,cc.xywh(2,2,5,1));
440

    
441
      btnUpBand.setActionCommand("_up");
442
      btnUpBand.setName("btnUpBand");
443
      btnUpBand.setText("_up");
444
      btnUpBand.setToolTipText("_up");
445
      jpanel1.add(btnUpBand,cc.xy(3,4));
446

    
447
      btnDownBand.setActionCommand("_down");
448
      btnDownBand.setName("btnDownBand");
449
      btnDownBand.setText("_down");
450
      btnDownBand.setToolTipText("_down");
451
      jpanel1.add(btnDownBand,cc.xy(5,4));
452

    
453
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5 });
454
      return jpanel1;
455
   }
456

    
457
   public JPanel createPanel7()
458
   {
459
      JPanel jpanel1 = new JPanel();
460
      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");
461
      CellConstraints cc = new CellConstraints();
462
      jpanel1.setLayout(formlayout1);
463

    
464
      lblLayerNames.setName("lblLayerNames");
465
      lblLayerNames.setText("_layers_names");
466
      jpanel1.add(lblLayerNames,cc.xy(2,2));
467

    
468
      txtLayerNames.setName("txtLayerNames");
469
      jpanel1.add(txtLayerNames,cc.xywh(4,2,3,1));
470

    
471
      chkOnePerBand.setActionCommand("_one_layer_per_band");
472
      chkOnePerBand.setName("chkOnePerBand");
473
      chkOnePerBand.setText("_one_layer_per_band");
474
      jpanel1.add(chkOnePerBand,cc.xywh(2,4,5,1));
475

    
476
      chkSaveTo.setActionCommand("_save_to");
477
      chkSaveTo.setName("chkSaveTo");
478
      chkSaveTo.setText("_save_to");
479
      jpanel1.add(chkSaveTo,cc.xywh(2,6,5,1));
480

    
481
      lblFolder.setEnabled(false);
482
      lblFolder.setName("lblFolder");
483
      lblFolder.setText("_folder");
484
      jpanel1.add(lblFolder,cc.xy(2,8));
485

    
486
      txtFolder.setEnabled(false);
487
      txtFolder.setName("txtFolder");
488
      jpanel1.add(txtFolder,cc.xy(4,8));
489

    
490
      btnFolderChooser.setActionCommand("...");
491
      btnFolderChooser.setEnabled(false);
492
      btnFolderChooser.setName("btnFolderChooser");
493
      btnFolderChooser.setText("...");
494
      btnFolderChooser.setToolTipText("_folder_selection");
495
      jpanel1.add(btnFolderChooser,cc.xy(6,8));
496

    
497
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9 });
498
      return jpanel1;
499
   }
500

    
501
   public JPanel createPanel8()
502
   {
503
      JPanel jpanel1 = new JPanel();
504
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
505
      CellConstraints cc = new CellConstraints();
506
      jpanel1.setLayout(formlayout1);
507

    
508
      btnApply.setActionCommand("_apply");
509
      btnApply.setName("btnApply");
510
      btnApply.setText("_apply");
511
      jpanel1.add(btnApply,cc.xy(1,1));
512

    
513
      btnAccept.setActionCommand("_accept");
514
      btnAccept.setName("btnAccept");
515
      btnAccept.setText("_accept");
516
      jpanel1.add(btnAccept,cc.xy(3,1));
517

    
518
      btnCancel.setActionCommand("_cancel");
519
      btnCancel.setName("btnCancel");
520
      btnCancel.setText("_cancel");
521
      jpanel1.add(btnCancel,cc.xy(5,1));
522

    
523
      addFillComponents(jpanel1,new int[]{ 2,4 },new int[0]);
524
      return jpanel1;
525
   }
526

    
527
   /**
528
    * Initializer
529
    */
530
   protected void initializePanel()
531
   {
532
      setLayout(new BorderLayout());
533
      add(createPanel(), BorderLayout.CENTER);
534
   }
535

    
536

    
537
}