svn-gvsig-desktop / 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 / SearchConditionFieldView.java @ 47784
History | View | Annotate | Download (4.22 KB)
1 | 47264 | jjdelcerro | /*
|
---|---|---|---|
2 | * To change this license header, choose License Headers in Project Properties.
|
||
3 | * To change this template file, choose Tools | Templates
|
||
4 | * and open the template in the editor.
|
||
5 | */
|
||
6 | package org.gvsig.fmap.dal.swing.impl.searchpanel; |
||
7 | |||
8 | import java.awt.Color; |
||
9 | import java.awt.GridBagConstraints; |
||
10 | import java.awt.GridBagLayout; |
||
11 | import java.awt.Insets; |
||
12 | import javax.swing.JButton; |
||
13 | import javax.swing.JComboBox; |
||
14 | import javax.swing.JLabel; |
||
15 | import javax.swing.JPanel; |
||
16 | import javax.swing.JTextField; |
||
17 | import javax.swing.SwingConstants; |
||
18 | import org.gvsig.tools.swing.api.ToolsSwingUtils; |
||
19 | |||
20 | /**
|
||
21 | *
|
||
22 | * @author jjdelcerro
|
||
23 | */
|
||
24 | public class SearchConditionFieldView extends JPanel { |
||
25 | |||
26 | public final JLabel lblFields; |
||
27 | public final JLabel lblExtraFields; |
||
28 | public final JLabel lblLogicalOperators; |
||
29 | public final JLabel lblRelationalOperators; |
||
30 | public final JComboBox cboValue; |
||
31 | public final JTextField txtValue; |
||
32 | public final JButton btnValue; |
||
33 | public final JLabel lblNull; |
||
34 | |||
35 | @SuppressWarnings({"OverridableMethodCallInConstructor", "LeakingThisInConstructor"}) |
||
36 | public SearchConditionFieldView() {
|
||
37 | this.lblFields = new JLabel(); |
||
38 | 47426 | jjdelcerro | this.lblExtraFields = new JLabel(ToolsSwingUtils.loadImage(this, "search-select-column")); |
39 | 47264 | jjdelcerro | this.lblRelationalOperators = new JLabel("WWWW"); |
40 | this.cboValue = new JComboBox(); |
||
41 | this.txtValue = new JTextField(); |
||
42 | this.btnValue = new JButton(); |
||
43 | this.lblNull = new JLabel(); |
||
44 | this.lblLogicalOperators = new JLabel(); |
||
45 | |||
46 | this.lblFields.setHorizontalAlignment(SwingConstants.CENTER); |
||
47 | this.lblRelationalOperators.setHorizontalAlignment(SwingConstants.CENTER); |
||
48 | this.cboValue.setEditable(true); |
||
49 | this.txtValue.setEditable(true); |
||
50 | ToolsSwingUtils.configurePickersButton( |
||
51 | btnValue, |
||
52 | null,
|
||
53 | "search-geometry-select",
|
||
54 | null,
|
||
55 | null
|
||
56 | ); |
||
57 | |||
58 | // this.setBackground(Color.BLUE.brighter());
|
||
59 | GridBagConstraints c = new GridBagConstraints(); |
||
60 | this.setLayout(new GridBagLayout()); |
||
61 | |||
62 | c.gridy = 0;
|
||
63 | c.gridx = 0;
|
||
64 | c.weightx = 1.0;
|
||
65 | c.fill = GridBagConstraints.HORIZONTAL;
|
||
66 | c.gridwidth = 2;
|
||
67 | c.insets = new Insets(2,2,2,2); |
||
68 | c.anchor = GridBagConstraints.CENTER;
|
||
69 | this.add(this.lblFields, c); |
||
70 | |||
71 | c.gridy = 0;
|
||
72 | c.gridx = 2;
|
||
73 | c.weightx = 0;
|
||
74 | c.fill = GridBagConstraints.NONE;
|
||
75 | c.gridwidth = 1;
|
||
76 | c.insets = new Insets(2,2,2,2); |
||
77 | c.anchor = GridBagConstraints.LINE_START;
|
||
78 | this.add(this.lblExtraFields, c); |
||
79 | |||
80 | c.gridx = 3;
|
||
81 | c.gridy = 0;
|
||
82 | c.weightx = 0;
|
||
83 | c.fill = GridBagConstraints.NONE;
|
||
84 | c.gridwidth = 1;
|
||
85 | c.insets = new Insets(2,2,2,2); |
||
86 | c.anchor = GridBagConstraints.LINE_START;
|
||
87 | this.add(this.lblLogicalOperators, c); |
||
88 | |||
89 | c.gridy = 1;
|
||
90 | c.gridx = 0;
|
||
91 | c.weightx = 1.0;
|
||
92 | c.fill = GridBagConstraints.HORIZONTAL;
|
||
93 | c.gridwidth = 2;
|
||
94 | c.insets = new Insets(2,2,2,2); |
||
95 | c.anchor = GridBagConstraints.CENTER;
|
||
96 | this.add(this.lblRelationalOperators, c); |
||
97 | |||
98 | 47407 | fdiaz | c.gridy = 1;
|
99 | c.gridx = 2;
|
||
100 | c.weightx = 1.0;
|
||
101 | c.fill = GridBagConstraints.NONE;
|
||
102 | c.gridwidth = 1;
|
||
103 | c.insets = new Insets(2,2,2,2); |
||
104 | c.anchor = GridBagConstraints.LINE_START;
|
||
105 | this.add(this.lblNull, c); |
||
106 | |||
107 | 47264 | jjdelcerro | c.gridy = 2;
|
108 | c.gridx = 0;
|
||
109 | c.weightx = 1.0;
|
||
110 | c.fill = GridBagConstraints.HORIZONTAL;
|
||
111 | c.gridwidth = 2;
|
||
112 | c.insets = new Insets(2,2,0,2); |
||
113 | c.anchor = GridBagConstraints.CENTER;
|
||
114 | this.add(this.cboValue, c); |
||
115 | |||
116 | c.gridy = 3;
|
||
117 | c.gridx = 0;
|
||
118 | c.weightx = 1.0;
|
||
119 | c.fill = GridBagConstraints.HORIZONTAL;
|
||
120 | c.gridwidth = 1;
|
||
121 | c.insets = new Insets(0,2,2,2); |
||
122 | c.anchor = GridBagConstraints.CENTER;
|
||
123 | this.add(this.txtValue, c); |
||
124 | |||
125 | c.gridy = 3;
|
||
126 | c.gridx = 1;
|
||
127 | c.weightx = 0;
|
||
128 | c.fill = GridBagConstraints.NONE;
|
||
129 | c.gridwidth = 1;
|
||
130 | c.insets = new Insets(0,2,2,2); |
||
131 | c.anchor = GridBagConstraints.LINE_START;
|
||
132 | this.add(this.btnValue, c); |
||
133 | |||
134 | } |
||
135 | } |