Revision 47184 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.swing/org.gvsig.fmap.dal.swing.impl/src/main/java/org/gvsig/fmap/dal/swing/impl/searchpanel/DefaultSearchPanelView2.java

View differences:

DefaultSearchPanelView2.java
7 7
import java.awt.ComponentOrientation;
8 8
import java.awt.Container;
9 9
import java.awt.Dimension;
10
import java.awt.event.WindowAdapter;
11
import java.awt.event.WindowEvent;
12 10
import javax.swing.Box;
13 11
import javax.swing.ImageIcon;
14 12
import javax.swing.JButton;
13
import javax.swing.JCheckBox;
15 14
import javax.swing.JComboBox;
16 15
import javax.swing.JFrame;
17 16
import javax.swing.JLabel;
......
64 63
   JButton btnClear = new JButton();
65 64
   JButton btnSearch = new JButton();
66 65
   JButton btnSearchPostProcess = new JButton();
66
   JCheckBox chkUseSelection = new JCheckBox();
67 67
   JButton btnHistory = new JButton();
68 68
   JButton btnBookmarks = new JButton();
69 69
   JPanel pnlCfgActions = new JPanel();
......
81 81
   }
82 82

  
83 83
   /**
84
    * Main method for panel
85
    */
86
   public static void main(String[] args)
87
   {
88
      JFrame frame = new JFrame();
89
      frame.setSize(600, 400);
90
      frame.setLocation(100, 100);
91
      frame.getContentPane().add(new DefaultSearchPanelView2());
92
      frame.setVisible(true);
93

  
94
      frame.addWindowListener( new WindowAdapter()
95
      {
96
         public void windowClosing( WindowEvent evt )
97
         {
98
            System.exit(0);
99
         }
100
      });
101
   }
102

  
103
   /**
104 84
    * Adds fill components to empty cells in the first row and first column of the grid.
105 85
    * This ensures that the grid spacing will be the same as shown in the designer.
106 86
    * @param cols an array of column indices in the first row where fill components should be added.
......
316 296
      lblNull4.setHorizontalAlignment(JLabel.CENTER);
317 297
      jpanel1.add(lblNull4,cc.xy(21,4));
318 298

  
319
      jpanel1.add(createPanel2(),cc.xywh(2,8,20,1));
299
      jpanel1.add(createPanel2(),new CellConstraints(2,8,20,1,CellConstraints.RIGHT,CellConstraints.DEFAULT));
320 300
      addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 },new int[]{ 1,2,3,4,5,6,7,8 });
321 301
      return jpanel1;
322 302
   }
......
324 304
   public JPanel createPanel2()
325 305
   {
326 306
      JPanel jpanel1 = new JPanel();
327
      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");
307
      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","CENTER:DEFAULT:NONE");
328 308
      CellConstraints cc = new CellConstraints();
329 309
      jpanel1.setLayout(formlayout1);
330 310

  
......
386 366
      jpanel1.add(btnAdvancedExpressionBookmarks,new CellConstraints(8,4,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
387 367

  
388 368
      txtAdvancedExpression.setName("txtAdvancedExpression");
369
      txtAdvancedExpression.setSelectionEnd(1720);
370
      txtAdvancedExpression.setSelectionStart(1720);
389 371
      txtAdvancedExpression.setText("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
390 372
      JScrollPane jscrollpane1 = new JScrollPane();
391 373
      jscrollpane1.setViewportView(txtAdvancedExpression);
......
436 418
   public JPanel createPanel6()
437 419
   {
438 420
      JPanel jpanel1 = new JPanel();
439
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:10PX:NONE","CENTER:DEFAULT:NONE");
421
      FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:10PX:NONE","CENTER:DEFAULT:NONE");
440 422
      CellConstraints cc = new CellConstraints();
441 423
      jpanel1.setLayout(formlayout1);
442 424

  
443 425
      btnClear.setActionCommand("Limpiar");
444 426
      btnClear.setName("btnClear");
445 427
      btnClear.setText("_Clear");
446
      jpanel1.add(btnClear,cc.xy(2,1));
428
      jpanel1.add(btnClear,cc.xy(3,1));
447 429

  
448 430
      btnSearch.setActionCommand("Buscar");
449 431
      btnSearch.setName("btnSearch");
450 432
      btnSearch.setText("_Search");
451
      jpanel1.add(btnSearch,cc.xy(4,1));
433
      jpanel1.add(btnSearch,cc.xy(5,1));
452 434

  
453 435
      btnSearchPostProcess.setActionCommand("Buscar");
454 436
      btnSearchPostProcess.setName("btnSearchPostProcess");
455 437
      btnSearchPostProcess.setText("_PostProcess");
456
      jpanel1.add(btnSearchPostProcess,cc.xy(6,1));
438
      jpanel1.add(btnSearchPostProcess,cc.xy(7,1));
457 439

  
458
      addFillComponents(jpanel1,new int[]{ 1,3,5,7 },new int[]{ 1 });
440
      chkUseSelection.setActionCommand("_Use_selection");
441
      chkUseSelection.setName("chkUseSelection");
442
      chkUseSelection.setText("_Use_selection");
443
      jpanel1.add(chkUseSelection,cc.xy(1,1));
444

  
445
      addFillComponents(jpanel1,new int[]{ 2,4,6,8 },new int[0]);
459 446
      return jpanel1;
460 447
   }
461 448

  

Also available in: Unified diff