Statistics
| Revision:

gvsig-projects-pool / org.gvsig.online / trunk / org.gvsig.online / org.gvsig.online.app / org.gvsig.online.app.mainplugin / src / main / java / org / gvsig / online / app / mainplugin / addlayer / AbstractWizardOnlineView.java @ 9521

History | View | Annotate | Download (22.2 KB)

1
package org.gvsig.online.app.mainplugin.addlayer;
2

    
3
import com.jeta.forms.components.border.TitledBorderLabel;
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.ImageIcon;
13
import javax.swing.JButton;
14
import javax.swing.JCheckBox;
15
import javax.swing.JComboBox;
16
import javax.swing.JFrame;
17
import javax.swing.JLabel;
18
import javax.swing.JList;
19
import javax.swing.JPanel;
20
import javax.swing.JProgressBar;
21
import javax.swing.JScrollPane;
22
import javax.swing.JTabbedPane;
23
import javax.swing.JTextField;
24
import javax.swing.JTree;
25
import javax.swing.border.EmptyBorder;
26

    
27

    
28
public class AbstractWizardOnlineView extends JPanel
29
{
30
   TitledBorderLabel lblTable = new TitledBorderLabel();
31
   TitledBorderLabel lblColumns = new TitledBorderLabel();
32
   JList lstColumns = new JList();
33
   JTree treeTables = new JTree();
34
   JButton btnDeselectAllColumns = new JButton();
35
   JButton btnSelectAllColumns = new JButton();
36
   JButton btnTablesFilter = new JButton();
37
   JTextField txtTablesFilter = new JTextField();
38
   JButton btnTablesCheckAll = new JButton();
39
   JButton btnTablesUncheckAll = new JButton();
40
   JButton btnTablesCollapseAll = new JButton();
41
   JButton btnTablesExpandAll = new JButton();
42
   JComboBox cboWorkspaces = new JComboBox();
43
   JButton btnAddWorkspace = new JButton();
44
   JButton btnInitWorkspace = new JButton();
45
   JLabel lblWorkspace = new JLabel();
46
   JButton btnDownload = new JButton();
47
   JLabel lblStatusTitle = new JLabel();
48
   JProgressBar pbStatus = new JProgressBar();
49
   JLabel lblStatusMessages = new JLabel();
50
   JButton btnAdvancedProperties = new JButton();
51
   JLabel lblReadOnlyNotification = new JLabel();
52
   JTabbedPane tabTableInfo = new JTabbedPane();
53
   JLabel lblName = new JLabel();
54
   JTextField txtName = new JTextField();
55
   JLabel lblIdField = new JLabel();
56
   JComboBox cboIdField = new JComboBox();
57
   JLabel lblGeometryField = new JLabel();
58
   JComboBox cboGeometryField = new JComboBox();
59
   JLabel lblProjection = new JLabel();
60
   JTextField txtProjection = new JTextField();
61
   JButton btnProjection = new JButton();
62
   JButton btnChangeViewProjection = new JButton();
63
   JLabel lblFilter = new JLabel();
64
   JTextField txtFilter = new JTextField();
65
   JButton btnFilter = new JButton();
66
   JButton btnFilterBookmarks = new JButton();
67
   JButton btnFilterHistory = new JButton();
68
   JLabel lblVisible = new JLabel();
69
   JCheckBox chkVisible = new JCheckBox();
70

    
71
   /**
72
    * Default constructor
73
    */
74
   public AbstractWizardOnlineView()
75
   {
76
      initializePanel();
77
   }
78

    
79
   /**
80
    * Adds fill components to empty cells in the first row and first column of the grid.
81
    * This ensures that the grid spacing will be the same as shown in the designer.
82
    * @param cols an array of column indices in the first row where fill components should be added.
83
    * @param rows an array of row indices in the first column where fill components should be added.
84
    */
85
   void addFillComponents( Container panel, int[] cols, int[] rows )
86
   {
87
      Dimension filler = new Dimension(10,10);
88

    
89
      boolean filled_cell_11 = false;
90
      CellConstraints cc = new CellConstraints();
91
      if ( cols.length > 0 && rows.length > 0 )
92
      {
93
         if ( cols[0] == 1 && rows[0] == 1 )
94
         {
95
            /** add a rigid area  */
96
            panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
97
            filled_cell_11 = true;
98
         }
99
      }
100

    
101
      for( int index = 0; index < cols.length; index++ )
102
      {
103
         if ( cols[index] == 1 && filled_cell_11 )
104
         {
105
            continue;
106
         }
107
         panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
108
      }
109

    
110
      for( int index = 0; index < rows.length; index++ )
111
      {
112
         if ( rows[index] == 1 && filled_cell_11 )
113
         {
114
            continue;
115
         }
116
         panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
117
      }
118

    
119
   }
120

    
121
   /**
122
    * Helper method to load an image file from the CLASSPATH
123
    * @param imageName the package and name of the file to load relative to the CLASSPATH
124
    * @return an ImageIcon instance with the specified image file
125
    * @throws IllegalArgumentException if the image resource cannot be loaded.
126
    */
127
   public ImageIcon loadImage( String imageName )
128
   {
129
      try
130
      {
131
         ClassLoader classloader = getClass().getClassLoader();
132
         java.net.URL url = classloader.getResource( imageName );
133
         if ( url != null )
134
         {
135
            ImageIcon icon = new ImageIcon( url );
136
            return icon;
137
         }
138
      }
139
      catch( Exception e )
140
      {
141
         e.printStackTrace();
142
      }
143
      throw new IllegalArgumentException( "Unable to load image: " + imageName );
144
   }
145

    
146
   /**
147
    * Method for recalculating the component orientation for 
148
    * right-to-left Locales.
149
    * @param orientation the component orientation to be applied
150
    */
151
   public void applyComponentOrientation( ComponentOrientation orientation )
152
   {
153
      // Not yet implemented...
154
      // I18NUtils.applyComponentOrientation(this, orientation);
155
      super.applyComponentOrientation(orientation);
156
   }
157

    
158
   public JPanel createPanel()
159
   {
160
      JPanel jpanel1 = new JPanel();
161
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:8DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
162
      CellConstraints cc = new CellConstraints();
163
      jpanel1.setLayout(formlayout1);
164

    
165
      jpanel1.add(createPanel1(),cc.xy(2,4));
166
      jpanel1.add(createPanel5(),cc.xy(2,2));
167
      jpanel1.add(createPanel6(),cc.xy(2,10));
168
      jpanel1.add(createPanel7(),cc.xy(2,9));
169
      tabTableInfo.setName("tabTableInfo");
170
      tabTableInfo.addTab("_General",null,createPanel8());
171
      tabTableInfo.addTab("_Others",null,createPanel11());
172
      jpanel1.add(tabTableInfo,cc.xy(2,7));
173

    
174
      addFillComponents(jpanel1,new int[]{ 1,2,3,4 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 });
175
      return jpanel1;
176
   }
177

    
178
   public JPanel createPanel1()
179
   {
180
      JPanel jpanel1 = new JPanel();
181
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(0.5),FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.5)","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
182
      CellConstraints cc = new CellConstraints();
183
      jpanel1.setLayout(formlayout1);
184

    
185
      lblTable.setName("lblTable");
186
      lblTable.setText("choose_table");
187
      jpanel1.add(lblTable,cc.xy(1,1));
188

    
189
      lblColumns.setName("lblColumns");
190
      lblColumns.setText("table_fields");
191
      jpanel1.add(lblColumns,cc.xy(3,1));
192

    
193
      lstColumns.setName("lstColumns");
194
      JScrollPane jscrollpane1 = new JScrollPane();
195
      jscrollpane1.setViewportView(lstColumns);
196
      jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
197
      jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
198
      jpanel1.add(jscrollpane1,cc.xywh(3,3,1,3));
199

    
200
      treeTables.setName("treeTables");
201
      treeTables.setRootVisible(false);
202
      JScrollPane jscrollpane2 = new JScrollPane();
203
      jscrollpane2.setViewportView(treeTables);
204
      jscrollpane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
205
      jscrollpane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
206
      jpanel1.add(jscrollpane2,cc.xy(1,5));
207

    
208
      jpanel1.add(createPanel2(),cc.xy(3,7));
209
      jpanel1.add(createPanel3(),cc.xy(1,3));
210
      jpanel1.add(createPanel4(),cc.xy(1,7));
211
      addFillComponents(jpanel1,new int[]{ 2 },new int[]{ 2,3,4,6,7 });
212
      return jpanel1;
213
   }
214

    
215
   public JPanel createPanel2()
216
   {
217
      JPanel jpanel1 = new JPanel();
218
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
219
      CellConstraints cc = new CellConstraints();
220
      jpanel1.setLayout(formlayout1);
221

    
222
      btnDeselectAllColumns.setActionCommand("Ninguno");
223
      btnDeselectAllColumns.setName("btnDeselectAllColumns");
224
      btnDeselectAllColumns.setText("_None");
225
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
226
      btnDeselectAllColumns.setBorder(emptyborder1);
227
      jpanel1.add(btnDeselectAllColumns,cc.xy(4,1));
228

    
229
      btnSelectAllColumns.setActionCommand("Todos");
230
      btnSelectAllColumns.setName("btnSelectAllColumns");
231
      btnSelectAllColumns.setText("_All");
232
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
233
      btnSelectAllColumns.setBorder(emptyborder2);
234
      jpanel1.add(btnSelectAllColumns,cc.xy(2,1));
235

    
236
      addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1 });
237
      return jpanel1;
238
   }
239

    
240
   public JPanel createPanel3()
241
   {
242
      JPanel jpanel1 = new JPanel();
243
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
244
      CellConstraints cc = new CellConstraints();
245
      jpanel1.setLayout(formlayout1);
246

    
247
      btnTablesFilter.setActionCommand("...");
248
      btnTablesFilter.setName("btnTablesFilter");
249
      btnTablesFilter.setText("...");
250
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
251
      btnTablesFilter.setBorder(emptyborder1);
252
      jpanel1.add(btnTablesFilter,cc.xy(3,1));
253

    
254
      txtTablesFilter.setName("txtTablesFilter");
255
      jpanel1.add(txtTablesFilter,cc.xy(1,1));
256

    
257
      addFillComponents(jpanel1,new int[]{ 2 },new int[0]);
258
      return jpanel1;
259
   }
260

    
261
   public JPanel createPanel4()
262
   {
263
      JPanel jpanel1 = new JPanel();
264
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
265
      CellConstraints cc = new CellConstraints();
266
      jpanel1.setLayout(formlayout1);
267

    
268
      btnTablesCheckAll.setActionCommand("...");
269
      btnTablesCheckAll.setEnabled(false);
270
      btnTablesCheckAll.setIcon(loadImage("src/main/resources/org/gvsig/vcsgis/swing/impl/images/common-check-on.png"));
271
      btnTablesCheckAll.setName("btnTablesCheckAll");
272
      btnTablesCheckAll.setOpaque(false);
273
      btnTablesCheckAll.setRolloverEnabled(true);
274
      btnTablesCheckAll.setToolTipText("_Select_all");
275
      EmptyBorder emptyborder1 = new EmptyBorder(1,1,1,1);
276
      btnTablesCheckAll.setBorder(emptyborder1);
277
      jpanel1.add(btnTablesCheckAll,cc.xy(1,1));
278

    
279
      btnTablesUncheckAll.setActionCommand("...");
280
      btnTablesUncheckAll.setEnabled(false);
281
      btnTablesUncheckAll.setIcon(loadImage("src/main/resources/org/gvsig/vcsgis/swing/impl/images/common-check-off.png"));
282
      btnTablesUncheckAll.setName("btnTablesUncheckAll");
283
      btnTablesUncheckAll.setOpaque(false);
284
      btnTablesUncheckAll.setRolloverEnabled(true);
285
      btnTablesUncheckAll.setToolTipText("_Unselect_all");
286
      EmptyBorder emptyborder2 = new EmptyBorder(1,1,1,1);
287
      btnTablesUncheckAll.setBorder(emptyborder2);
288
      jpanel1.add(btnTablesUncheckAll,cc.xy(2,1));
289

    
290
      btnTablesCollapseAll.setActionCommand("...");
291
      btnTablesCollapseAll.setEnabled(false);
292
      btnTablesCollapseAll.setIcon(loadImage("addons/SQLWorkbenchJ/common-collapse-all.png"));
293
      btnTablesCollapseAll.setName("btnTablesCollapseAll");
294
      btnTablesCollapseAll.setOpaque(false);
295
      btnTablesCollapseAll.setRolloverEnabled(true);
296
      btnTablesCollapseAll.setToolTipText("_Collapse_all");
297
      EmptyBorder emptyborder3 = new EmptyBorder(1,1,1,1);
298
      btnTablesCollapseAll.setBorder(emptyborder3);
299
      jpanel1.add(btnTablesCollapseAll,cc.xy(3,1));
300

    
301
      btnTablesExpandAll.setActionCommand("...");
302
      btnTablesExpandAll.setEnabled(false);
303
      btnTablesExpandAll.setIcon(loadImage("addons/SQLWorkbenchJ/common-expand-all.png"));
304
      btnTablesExpandAll.setName("btnTablesExpandAll");
305
      btnTablesExpandAll.setOpaque(false);
306
      btnTablesExpandAll.setRolloverEnabled(true);
307
      btnTablesExpandAll.setToolTipText("_Expand_all");
308
      EmptyBorder emptyborder4 = new EmptyBorder(1,1,1,1);
309
      btnTablesExpandAll.setBorder(emptyborder4);
310
      jpanel1.add(btnTablesExpandAll,cc.xy(4,1));
311

    
312
      addFillComponents(jpanel1,new int[]{ 5,6 },new int[0]);
313
      return jpanel1;
314
   }
315

    
316
   public JPanel createPanel5()
317
   {
318
      JPanel jpanel1 = new JPanel();
319
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
320
      CellConstraints cc = new CellConstraints();
321
      jpanel1.setLayout(formlayout1);
322

    
323
      cboWorkspaces.setName("cboWorkspaces");
324
      jpanel1.add(cboWorkspaces,cc.xy(3,1));
325

    
326
      btnAddWorkspace.setActionCommand("...");
327
      btnAddWorkspace.setName("btnAddWorkspace");
328
      btnAddWorkspace.setText("...");
329
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
330
      btnAddWorkspace.setBorder(emptyborder1);
331
      jpanel1.add(btnAddWorkspace,cc.xy(5,1));
332

    
333
      btnInitWorkspace.setActionCommand("...");
334
      btnInitWorkspace.setIcon(loadImage("datos/devel/org.gvsig.online/org.gvsig.online.swing/org.gvsig.online.swing.impl/src/main/resources/org/gvsig/online/swing/impl/images/online-common-init-workspace"));
335
      btnInitWorkspace.setName("btnInitWorkspace");
336
      btnInitWorkspace.setToolTipText("_If_you_cant_find_the_layer_you_can_click_here_to_create_a_new_workingcopy_from_a_gvSIG_Online_server");
337
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
338
      btnInitWorkspace.setBorder(emptyborder2);
339
      btnInitWorkspace.setHorizontalTextPosition(JButton.LEFT);
340
      jpanel1.add(btnInitWorkspace,cc.xy(7,1));
341

    
342
      lblWorkspace.setName("lblWorkspace");
343
      lblWorkspace.setText("_Workingcopy");
344
      jpanel1.add(lblWorkspace,cc.xy(1,1));
345

    
346
      btnDownload.setActionCommand("...");
347
      btnDownload.setIcon(loadImage("datos/devel/org.gvsig.online/org.gvsig.online.swing/org.gvsig.online.swing.impl/src/main/resources/org/gvsig/online/swing/impl/images/online-common-download.png"));
348
      btnDownload.setName("btnDownload");
349
      btnDownload.setToolTipText("_If_you_cant_find_the_layer_you_can_click_here_to_download_it_from_gvSIG_Online_server_to_an_existent_workingcopy");
350
      EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2);
351
      btnDownload.setBorder(emptyborder3);
352
      jpanel1.add(btnDownload,cc.xy(9,1));
353

    
354
      addFillComponents(jpanel1,new int[]{ 2,4,6,8 },new int[]{ 2 });
355
      return jpanel1;
356
   }
357

    
358
   public JPanel createPanel6()
359
   {
360
      JPanel jpanel1 = new JPanel();
361
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:MIN(16PX;DEFAULT):NONE,CENTER:MIN(16PX;DEFAULT):NONE,CENTER:MIN(16PX;DEFAULT):NONE");
362
      CellConstraints cc = new CellConstraints();
363
      jpanel1.setLayout(formlayout1);
364

    
365
      lblStatusTitle.setName("lblStatusTitle");
366
      jpanel1.add(lblStatusTitle,cc.xy(1,1));
367

    
368
      pbStatus.setName("pbStatus");
369
      pbStatus.setValue(25);
370
      jpanel1.add(pbStatus,cc.xy(1,2));
371

    
372
      lblStatusMessages.setName("lblStatusMessages");
373
      jpanel1.add(lblStatusMessages,cc.xy(1,3));
374

    
375
      JLabel jlabel1 = new JLabel();
376
      jlabel1.setText(" ");
377
      jpanel1.add(jlabel1,cc.xy(2,1));
378

    
379
      JLabel jlabel2 = new JLabel();
380
      jlabel2.setText(" ");
381
      jpanel1.add(jlabel2,cc.xy(2,2));
382

    
383
      JLabel jlabel3 = new JLabel();
384
      jlabel3.setText(" ");
385
      jpanel1.add(jlabel3,cc.xy(2,3));
386

    
387
      addFillComponents(jpanel1,new int[0],new int[0]);
388
      return jpanel1;
389
   }
390

    
391
   public JPanel createPanel7()
392
   {
393
      JPanel jpanel1 = new JPanel();
394
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
395
      CellConstraints cc = new CellConstraints();
396
      jpanel1.setLayout(formlayout1);
397

    
398
      btnAdvancedProperties.setActionCommand("_Advanced_properties");
399
      btnAdvancedProperties.setName("btnAdvancedProperties");
400
      btnAdvancedProperties.setText("_Advanced_properties");
401
      jpanel1.add(btnAdvancedProperties,cc.xy(5,1));
402

    
403
      lblReadOnlyNotification.setName("lblReadOnlyNotification");
404
      jpanel1.add(lblReadOnlyNotification,cc.xywh(1,1,2,1));
405

    
406
      addFillComponents(jpanel1,new int[]{ 2,3,4 },new int[0]);
407
      return jpanel1;
408
   }
409

    
410
   public JPanel createPanel8()
411
   {
412
      JPanel jpanel1 = new JPanel();
413
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
414
      CellConstraints cc = new CellConstraints();
415
      jpanel1.setLayout(formlayout1);
416

    
417
      jpanel1.add(createPanel9(),cc.xy(2,2));
418
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 });
419
      return jpanel1;
420
   }
421

    
422
   public JPanel createPanel9()
423
   {
424
      JPanel jpanel1 = new JPanel();
425
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)","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");
426
      CellConstraints cc = new CellConstraints();
427
      jpanel1.setLayout(formlayout1);
428

    
429
      lblName.setName("lblName");
430
      lblName.setText("_Name");
431
      jpanel1.add(lblName,cc.xy(1,2));
432

    
433
      txtName.setName("txtName");
434
      jpanel1.add(txtName,cc.xy(3,2));
435

    
436
      lblIdField.setName("lblIdField");
437
      lblIdField.setText("_Id_field");
438
      jpanel1.add(lblIdField,cc.xy(1,4));
439

    
440
      cboIdField.setName("cboIdField");
441
      jpanel1.add(cboIdField,cc.xy(3,4));
442

    
443
      lblGeometryField.setName("lblGeometryField");
444
      lblGeometryField.setText("_Geo_field");
445
      jpanel1.add(lblGeometryField,cc.xy(1,6));
446

    
447
      cboGeometryField.setName("cboGeometryField");
448
      jpanel1.add(cboGeometryField,cc.xy(3,6));
449

    
450
      lblProjection.setName("lblProjection");
451
      lblProjection.setText("_Projection");
452
      jpanel1.add(lblProjection,cc.xy(1,8));
453

    
454
      jpanel1.add(createPanel10(),cc.xy(3,8));
455
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,3,5,7,9 });
456
      return jpanel1;
457
   }
458

    
459
   public JPanel createPanel10()
460
   {
461
      JPanel jpanel1 = new JPanel();
462
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:NONE");
463
      CellConstraints cc = new CellConstraints();
464
      jpanel1.setLayout(formlayout1);
465

    
466
      txtProjection.setName("txtProjection");
467
      jpanel1.add(txtProjection,cc.xy(1,1));
468

    
469
      btnProjection.setActionCommand("...");
470
      btnProjection.setName("btnProjection");
471
      btnProjection.setText("...");
472
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
473
      btnProjection.setBorder(emptyborder1);
474
      jpanel1.add(btnProjection,cc.xy(3,1));
475

    
476
      btnChangeViewProjection.setActionCommand("...");
477
      btnChangeViewProjection.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/resources-plugin/images/geodb/geodb-crstoview.png"));
478
      btnChangeViewProjection.setName("btnChangeViewProjection");
479
      btnChangeViewProjection.setOpaque(false);
480
      btnChangeViewProjection.setToolTipText("_Change_view_projection_to_this_projection");
481
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
482
      btnChangeViewProjection.setBorder(emptyborder2);
483
      jpanel1.add(btnChangeViewProjection,cc.xy(5,1));
484

    
485
      addFillComponents(jpanel1,new int[]{ 2,4 },new int[0]);
486
      return jpanel1;
487
   }
488

    
489
   public JPanel createPanel11()
490
   {
491
      JPanel jpanel1 = new JPanel();
492
      FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
493
      CellConstraints cc = new CellConstraints();
494
      jpanel1.setLayout(formlayout1);
495

    
496
      jpanel1.add(createPanel12(),cc.xy(2,2));
497
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 });
498
      return jpanel1;
499
   }
500

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

    
508
      lblFilter.setName("lblFilter");
509
      lblFilter.setText("_Filter");
510
      jpanel1.add(lblFilter,cc.xy(1,2));
511

    
512
      jpanel1.add(createPanel13(),cc.xy(3,2));
513
      lblVisible.setName("lblVisible");
514
      lblVisible.setText("_Visible");
515
      jpanel1.add(lblVisible,cc.xy(1,4));
516

    
517
      chkVisible.setName("chkVisible");
518
      jpanel1.add(chkVisible,cc.xy(3,4));
519

    
520
      addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,3 });
521
      return jpanel1;
522
   }
523

    
524
   public JPanel createPanel13()
525
   {
526
      JPanel jpanel1 = new JPanel();
527
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
528
      CellConstraints cc = new CellConstraints();
529
      jpanel1.setLayout(formlayout1);
530

    
531
      txtFilter.setName("txtFilter");
532
      jpanel1.add(txtFilter,cc.xy(1,1));
533

    
534
      btnFilter.setActionCommand("...");
535
      btnFilter.setName("btnFilter");
536
      btnFilter.setText("...");
537
      EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2);
538
      btnFilter.setBorder(emptyborder1);
539
      jpanel1.add(btnFilter,cc.xy(3,1));
540

    
541
      btnFilterBookmarks.setActionCommand("...");
542
      btnFilterBookmarks.setName("btnFilterBookmarks");
543
      btnFilterBookmarks.setText("...");
544
      EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
545
      btnFilterBookmarks.setBorder(emptyborder2);
546
      jpanel1.add(btnFilterBookmarks,cc.xy(7,1));
547

    
548
      btnFilterHistory.setActionCommand("...");
549
      btnFilterHistory.setName("btnFilterHistory");
550
      btnFilterHistory.setText("...");
551
      EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2);
552
      btnFilterHistory.setBorder(emptyborder3);
553
      jpanel1.add(btnFilterHistory,cc.xy(5,1));
554

    
555
      addFillComponents(jpanel1,new int[]{ 2,4,6 },new int[0]);
556
      return jpanel1;
557
   }
558

    
559
   /**
560
    * Initializer
561
    */
562
   protected void initializePanel()
563
   {
564
      setLayout(new BorderLayout());
565
      add(createPanel(), BorderLayout.CENTER);
566
   }
567

    
568

    
569
}