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 / DefaultSearchPanelView.java @ 44842
History | View | Annotate | Download (18 KB)
1 |
package org.gvsig.fmap.dal.swing.impl.searchpanel; |
---|---|
2 |
import com.jeta.open.i18n.I18NUtils; |
3 |
import com.jgoodies.forms.layout.CellConstraints; |
4 |
import com.jgoodies.forms.layout.FormLayout; |
5 |
import java.awt.BorderLayout; |
6 |
import java.awt.ComponentOrientation; |
7 |
import java.awt.Container; |
8 |
import java.awt.Dimension; |
9 |
import java.awt.event.WindowAdapter; |
10 |
import java.awt.event.WindowEvent; |
11 |
import javax.swing.Box; |
12 |
import javax.swing.ImageIcon; |
13 |
import javax.swing.JButton; |
14 |
import javax.swing.JComboBox; |
15 |
import javax.swing.JFrame; |
16 |
import javax.swing.JLabel; |
17 |
import javax.swing.JPanel; |
18 |
import javax.swing.JScrollPane; |
19 |
import javax.swing.JTabbedPane; |
20 |
import javax.swing.JTable; |
21 |
import javax.swing.JTextArea; |
22 |
import javax.swing.border.EmptyBorder; |
23 |
|
24 |
|
25 |
public class DefaultSearchPanelView extends JPanel |
26 |
{ |
27 |
JTabbedPane tabSearchMode = new JTabbedPane(); |
28 |
JComboBox cboValue1 = new JComboBox(); |
29 |
JComboBox cboValue2 = new JComboBox(); |
30 |
JComboBox cboValue3 = new JComboBox(); |
31 |
JComboBox cboValue4 = new JComboBox(); |
32 |
JLabel lblRelationalOperator1 = new JLabel(); |
33 |
JLabel lblRelationalOperator2 = new JLabel(); |
34 |
JLabel lblRelationalOperator3 = new JLabel(); |
35 |
JLabel lblRelationalOperator4 = new JLabel(); |
36 |
JLabel lblLogicalOperators1 = new JLabel(); |
37 |
JLabel lblLogicalOperators2 = new JLabel(); |
38 |
JLabel lblLogicalOperators3 = new JLabel(); |
39 |
JLabel lblField1 = new JLabel(); |
40 |
JLabel lblField2 = new JLabel(); |
41 |
JLabel lblField3 = new JLabel(); |
42 |
JLabel lblField4 = new JLabel(); |
43 |
JLabel lblExtraFields1 = new JLabel(); |
44 |
JLabel lblExtraFields2 = new JLabel(); |
45 |
JLabel lblExtraFields3 = new JLabel(); |
46 |
JLabel lblExtraFields4 = new JLabel(); |
47 |
JButton btnRemoveAccumulatedFilter = new JButton(); |
48 |
JButton btnAddAccumulatedFilter = new JButton(); |
49 |
JButton btnViewAccumulatedFilter = new JButton(); |
50 |
JLabel lblExpressionDeBusqueda = new JLabel(); |
51 |
JButton btnAdvancedExpression = new JButton(); |
52 |
JButton btnAdvancedExpressionHistory = new JButton(); |
53 |
JButton btnAdvancedExpressionBookmarks = new JButton(); |
54 |
JTextArea txtAdvancedExpression = new JTextArea(); |
55 |
JTable tblResults = new JTable(); |
56 |
JButton btnSearch = new JButton(); |
57 |
JButton btnClear = new JButton(); |
58 |
JLabel lblMsg = new JLabel(); |
59 |
JPanel pnlActions = new JPanel(); |
60 |
JPanel pnlCfgActions = new JPanel(); |
61 |
JButton btnHistory = new JButton(); |
62 |
JButton btnBookmarks = new JButton(); |
63 |
|
64 |
/**
|
65 |
* Default constructor
|
66 |
*/
|
67 |
public DefaultSearchPanelView()
|
68 |
{ |
69 |
initializePanel(); |
70 |
} |
71 |
|
72 |
/**
|
73 |
* Main method for panel
|
74 |
*/
|
75 |
public static void main(String[] args) |
76 |
{ |
77 |
JFrame frame = new JFrame(); |
78 |
frame.setSize(600, 400); |
79 |
frame.setLocation(100, 100); |
80 |
frame.getContentPane().add(new DefaultSearchPanelView());
|
81 |
frame.setVisible(true);
|
82 |
|
83 |
frame.addWindowListener( new WindowAdapter() |
84 |
{ |
85 |
public void windowClosing( WindowEvent evt ) |
86 |
{ |
87 |
System.exit(0); |
88 |
} |
89 |
}); |
90 |
} |
91 |
|
92 |
/**
|
93 |
* Adds fill components to empty cells in the first row and first column of the grid.
|
94 |
* This ensures that the grid spacing will be the same as shown in the designer.
|
95 |
* @param cols an array of column indices in the first row where fill components should be added.
|
96 |
* @param rows an array of row indices in the first column where fill components should be added.
|
97 |
*/
|
98 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
99 |
{ |
100 |
Dimension filler = new Dimension(10,10); |
101 |
|
102 |
boolean filled_cell_11 = false; |
103 |
CellConstraints cc = new CellConstraints();
|
104 |
if ( cols.length > 0 && rows.length > 0 ) |
105 |
{ |
106 |
if ( cols[0] == 1 && rows[0] == 1 ) |
107 |
{ |
108 |
/** add a rigid area */
|
109 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
110 |
filled_cell_11 = true;
|
111 |
} |
112 |
} |
113 |
|
114 |
for( int index = 0; index < cols.length; index++ ) |
115 |
{ |
116 |
if ( cols[index] == 1 && filled_cell_11 ) |
117 |
{ |
118 |
continue;
|
119 |
} |
120 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
121 |
} |
122 |
|
123 |
for( int index = 0; index < rows.length; index++ ) |
124 |
{ |
125 |
if ( rows[index] == 1 && filled_cell_11 ) |
126 |
{ |
127 |
continue;
|
128 |
} |
129 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
130 |
} |
131 |
|
132 |
} |
133 |
|
134 |
/**
|
135 |
* Helper method to load an image file from the CLASSPATH
|
136 |
* @param imageName the package and name of the file to load relative to the CLASSPATH
|
137 |
* @return an ImageIcon instance with the specified image file
|
138 |
* @throws IllegalArgumentException if the image resource cannot be loaded.
|
139 |
*/
|
140 |
public ImageIcon loadImage( String imageName ) |
141 |
{ |
142 |
try
|
143 |
{ |
144 |
ClassLoader classloader = getClass().getClassLoader();
|
145 |
java.net.URL url = classloader.getResource( imageName ); |
146 |
if ( url != null ) |
147 |
{ |
148 |
ImageIcon icon = new ImageIcon( url ); |
149 |
return icon;
|
150 |
} |
151 |
} |
152 |
catch( Exception e ) |
153 |
{ |
154 |
e.printStackTrace(); |
155 |
} |
156 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
157 |
} |
158 |
|
159 |
/**
|
160 |
* Method for recalculating the component orientation for
|
161 |
* right-to-left Locales.
|
162 |
* @param orientation the component orientation to be applied
|
163 |
*/
|
164 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
165 |
{ |
166 |
// Not yet implemented...
|
167 |
// I18NUtils.applyComponentOrientation(this, orientation);
|
168 |
super.applyComponentOrientation(orientation);
|
169 |
} |
170 |
|
171 |
public JPanel createPanel() |
172 |
{ |
173 |
JPanel jpanel1 = new JPanel(); |
174 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
175 |
CellConstraints cc = new CellConstraints();
|
176 |
jpanel1.setLayout(formlayout1); |
177 |
|
178 |
tabSearchMode.setName("tabSearchMode");
|
179 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
180 |
tabSearchMode.setBorder(emptyborder1); |
181 |
tabSearchMode.setTabPlacement(JTabbedPane.BOTTOM);
|
182 |
tabSearchMode.addTab("_Simplified",null,createPanel1()); |
183 |
tabSearchMode.addTab("_Advanced",null,createPanel3()); |
184 |
jpanel1.add(tabSearchMode,cc.xy(2,3)); |
185 |
|
186 |
tblResults.setName("tblResults");
|
187 |
JScrollPane jscrollpane1 = new JScrollPane(); |
188 |
jscrollpane1.setViewportView(tblResults); |
189 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
190 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
191 |
jpanel1.add(jscrollpane1,cc.xy(2,6)); |
192 |
|
193 |
jpanel1.add(createPanel4(),cc.xy(2,4)); |
194 |
jpanel1.add(createPanel5(),cc.xy(2,8)); |
195 |
jpanel1.add(createPanel6(),cc.xy(2,2)); |
196 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
197 |
return jpanel1;
|
198 |
} |
199 |
|
200 |
public JPanel createPanel1() |
201 |
{ |
202 |
JPanel jpanel1 = new JPanel(); |
203 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:12DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:12DLU:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
204 |
CellConstraints cc = new CellConstraints();
|
205 |
jpanel1.setLayout(formlayout1); |
206 |
|
207 |
cboValue1.setEditable(true);
|
208 |
cboValue1.setName("cboValue1");
|
209 |
cboValue1.setRequestFocusEnabled(false);
|
210 |
jpanel1.add(cboValue1,cc.xywh(2,6,3,1)); |
211 |
|
212 |
cboValue2.setEditable(true);
|
213 |
cboValue2.setName("cboValue2");
|
214 |
cboValue2.setRequestFocusEnabled(false);
|
215 |
jpanel1.add(cboValue2,cc.xywh(8,6,3,1)); |
216 |
|
217 |
cboValue3.setEditable(true);
|
218 |
cboValue3.setName("cboValue3");
|
219 |
cboValue3.setRequestFocusEnabled(false);
|
220 |
jpanel1.add(cboValue3,cc.xywh(14,6,3,1)); |
221 |
|
222 |
cboValue4.setEditable(true);
|
223 |
cboValue4.setName("cboValue4");
|
224 |
cboValue4.setRequestFocusEnabled(false);
|
225 |
jpanel1.add(cboValue4,cc.xywh(20,6,2,1)); |
226 |
|
227 |
lblRelationalOperator1.setName("lblRelationalOperator1");
|
228 |
lblRelationalOperator1.setText("Igual");
|
229 |
lblRelationalOperator1.setHorizontalAlignment(JLabel.CENTER);
|
230 |
jpanel1.add(lblRelationalOperator1,cc.xy(2,4)); |
231 |
|
232 |
lblRelationalOperator2.setName("lblRelationalOperator2");
|
233 |
lblRelationalOperator2.setText("Igual");
|
234 |
lblRelationalOperator2.setHorizontalAlignment(JLabel.CENTER);
|
235 |
jpanel1.add(lblRelationalOperator2,cc.xy(8,4)); |
236 |
|
237 |
lblRelationalOperator3.setName("lblRelationalOperator3");
|
238 |
lblRelationalOperator3.setText("Igual");
|
239 |
lblRelationalOperator3.setHorizontalAlignment(JLabel.CENTER);
|
240 |
jpanel1.add(lblRelationalOperator3,cc.xy(14,4)); |
241 |
|
242 |
lblRelationalOperator4.setName("lblRelationalOperator4");
|
243 |
lblRelationalOperator4.setText("Igual");
|
244 |
lblRelationalOperator4.setHorizontalAlignment(JLabel.CENTER);
|
245 |
jpanel1.add(lblRelationalOperator4,cc.xy(20,4)); |
246 |
|
247 |
lblLogicalOperators1.setName("lblLogicalOperators1");
|
248 |
lblLogicalOperators1.setText("WWWWW");
|
249 |
lblLogicalOperators1.setHorizontalAlignment(JLabel.CENTER);
|
250 |
jpanel1.add(lblLogicalOperators1,cc.xy(6,2)); |
251 |
|
252 |
lblLogicalOperators2.setName("lblLogicalOperators2");
|
253 |
lblLogicalOperators2.setText("WWWWW");
|
254 |
lblLogicalOperators2.setHorizontalAlignment(JLabel.CENTER);
|
255 |
jpanel1.add(lblLogicalOperators2,cc.xy(12,2)); |
256 |
|
257 |
lblLogicalOperators3.setName("lblLogicalOperators3");
|
258 |
lblLogicalOperators3.setText("WWWWW");
|
259 |
lblLogicalOperators3.setHorizontalAlignment(JLabel.CENTER);
|
260 |
jpanel1.add(lblLogicalOperators3,cc.xy(18,2)); |
261 |
|
262 |
lblField1.setName("lblField1");
|
263 |
lblField1.setHorizontalAlignment(JLabel.CENTER);
|
264 |
jpanel1.add(lblField1,cc.xy(2,2)); |
265 |
|
266 |
lblField2.setName("lblField2");
|
267 |
lblField2.setHorizontalAlignment(JLabel.CENTER);
|
268 |
jpanel1.add(lblField2,cc.xy(8,2)); |
269 |
|
270 |
lblField3.setName("lblField3");
|
271 |
lblField3.setHorizontalAlignment(JLabel.CENTER);
|
272 |
jpanel1.add(lblField3,cc.xy(14,2)); |
273 |
|
274 |
lblField4.setName("lblField4");
|
275 |
lblField4.setHorizontalAlignment(JLabel.CENTER);
|
276 |
jpanel1.add(lblField4,cc.xy(20,2)); |
277 |
|
278 |
lblExtraFields1.setIcon(loadImage("src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-column.png"));
|
279 |
lblExtraFields1.setName("lblExtraFields1");
|
280 |
jpanel1.add(lblExtraFields1,cc.xy(4,2)); |
281 |
|
282 |
lblExtraFields2.setIcon(loadImage("src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-column.png"));
|
283 |
lblExtraFields2.setName("lblExtraFields2");
|
284 |
jpanel1.add(lblExtraFields2,cc.xy(10,2)); |
285 |
|
286 |
lblExtraFields3.setIcon(loadImage("src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-column.png"));
|
287 |
lblExtraFields3.setName("lblExtraFields3");
|
288 |
jpanel1.add(lblExtraFields3,cc.xy(16,2)); |
289 |
|
290 |
lblExtraFields4.setIcon(loadImage("src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/featurestore-column.png"));
|
291 |
lblExtraFields4.setName("lblExtraFields4");
|
292 |
jpanel1.add(lblExtraFields4,cc.xy(21,2)); |
293 |
|
294 |
jpanel1.add(createPanel2(),cc.xywh(2,8,20,1)); |
295 |
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,9 }); |
296 |
return jpanel1;
|
297 |
} |
298 |
|
299 |
public JPanel createPanel2() |
300 |
{ |
301 |
JPanel jpanel1 = new JPanel(); |
302 |
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"); |
303 |
CellConstraints cc = new CellConstraints();
|
304 |
jpanel1.setLayout(formlayout1); |
305 |
|
306 |
btnRemoveAccumulatedFilter.setActionCommand("...");
|
307 |
btnRemoveAccumulatedFilter.setIcon(loadImage("src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/search-simplifiedcondition-clear-accumulate.png"));
|
308 |
btnRemoveAccumulatedFilter.setName("btnRemoveAccumulatedFilter");
|
309 |
btnRemoveAccumulatedFilter.setToolTipText("_Remove_accumulated_filter");
|
310 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
311 |
btnRemoveAccumulatedFilter.setBorder(emptyborder1); |
312 |
jpanel1.add(btnRemoveAccumulatedFilter,cc.xy(3,1)); |
313 |
|
314 |
btnAddAccumulatedFilter.setActionCommand("...");
|
315 |
btnAddAccumulatedFilter.setIcon(loadImage("src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/search-simplifiedcondition-add-accumulate.png"));
|
316 |
btnAddAccumulatedFilter.setName("btnAddAccumulatedFilter");
|
317 |
btnAddAccumulatedFilter.setToolTipText("_Accumulate_filter");
|
318 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
319 |
btnAddAccumulatedFilter.setBorder(emptyborder2); |
320 |
jpanel1.add(btnAddAccumulatedFilter,cc.xy(7,1)); |
321 |
|
322 |
btnViewAccumulatedFilter.setActionCommand("...");
|
323 |
btnViewAccumulatedFilter.setIcon(loadImage("src/main/resources/org/gvsig/fmap/dal/swing/impl/searchpanel/search-simplifiedcondition-edit-accumulate.png"));
|
324 |
btnViewAccumulatedFilter.setName("btnViewAccumulatedFilter");
|
325 |
btnViewAccumulatedFilter.setToolTipText("_View_accumulated_filter");
|
326 |
EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2); |
327 |
btnViewAccumulatedFilter.setBorder(emptyborder3); |
328 |
jpanel1.add(btnViewAccumulatedFilter,cc.xy(5,1)); |
329 |
|
330 |
addFillComponents(jpanel1,new int[]{ 1,2,4,6 },new int[]{ 1 }); |
331 |
return jpanel1;
|
332 |
} |
333 |
|
334 |
public JPanel createPanel3() |
335 |
{ |
336 |
JPanel jpanel1 = new JPanel(); |
337 |
FormLayout formlayout1 = new FormLayout("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,FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
338 |
CellConstraints cc = new CellConstraints();
|
339 |
jpanel1.setLayout(formlayout1); |
340 |
|
341 |
lblExpressionDeBusqueda.setName("lblExpressionDeBusqueda");
|
342 |
lblExpressionDeBusqueda.setText("_Insert_a_search_expression");
|
343 |
jpanel1.add(lblExpressionDeBusqueda,cc.xy(2,2)); |
344 |
|
345 |
btnAdvancedExpression.setActionCommand("...");
|
346 |
btnAdvancedExpression.setName("btnAdvancedExpression");
|
347 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
348 |
btnAdvancedExpression.setBorder(emptyborder1); |
349 |
jpanel1.add(btnAdvancedExpression,new CellConstraints(4,4,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
350 |
|
351 |
btnAdvancedExpressionHistory.setActionCommand("...");
|
352 |
btnAdvancedExpressionHistory.setName("btnAdvancedExpressionHistory");
|
353 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
354 |
btnAdvancedExpressionHistory.setBorder(emptyborder2); |
355 |
jpanel1.add(btnAdvancedExpressionHistory,new CellConstraints(6,4,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
356 |
|
357 |
btnAdvancedExpressionBookmarks.setActionCommand("...");
|
358 |
btnAdvancedExpressionBookmarks.setName("btnAdvancedExpressionBookmarks");
|
359 |
EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2); |
360 |
btnAdvancedExpressionBookmarks.setBorder(emptyborder3); |
361 |
jpanel1.add(btnAdvancedExpressionBookmarks,new CellConstraints(8,4,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
362 |
|
363 |
txtAdvancedExpression.setName("txtAdvancedExpression");
|
364 |
JScrollPane jscrollpane1 = new JScrollPane(); |
365 |
jscrollpane1.setViewportView(txtAdvancedExpression); |
366 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
367 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
368 |
jpanel1.add(jscrollpane1,cc.xy(2,4)); |
369 |
|
370 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9 },new int[]{ 1,2,3,4,5 }); |
371 |
return jpanel1;
|
372 |
} |
373 |
|
374 |
public JPanel createPanel4() |
375 |
{ |
376 |
JPanel jpanel1 = new JPanel(); |
377 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
378 |
CellConstraints cc = new CellConstraints();
|
379 |
jpanel1.setLayout(formlayout1); |
380 |
|
381 |
btnSearch.setActionCommand("Buscar");
|
382 |
btnSearch.setName("btnSearch");
|
383 |
btnSearch.setText("_Search");
|
384 |
jpanel1.add(btnSearch,cc.xy(4,1)); |
385 |
|
386 |
btnClear.setActionCommand("Limpiar");
|
387 |
btnClear.setName("btnClear");
|
388 |
btnClear.setText("_Clear");
|
389 |
jpanel1.add(btnClear,cc.xy(2,1)); |
390 |
|
391 |
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1 }); |
392 |
return jpanel1;
|
393 |
} |
394 |
|
395 |
public JPanel createPanel5() |
396 |
{ |
397 |
JPanel jpanel1 = new JPanel(); |
398 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
399 |
CellConstraints cc = new CellConstraints();
|
400 |
jpanel1.setLayout(formlayout1); |
401 |
|
402 |
lblMsg.setName("lblMsg");
|
403 |
jpanel1.add(lblMsg,cc.xy(1,1)); |
404 |
|
405 |
pnlActions.setName("pnlActions");
|
406 |
jpanel1.add(pnlActions,cc.xy(3,1)); |
407 |
|
408 |
addFillComponents(jpanel1,new int[]{ 2 },new int[0]); |
409 |
return jpanel1;
|
410 |
} |
411 |
|
412 |
public JPanel createPanel6() |
413 |
{ |
414 |
JPanel jpanel1 = new JPanel(); |
415 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE,FILL:3PX:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
416 |
CellConstraints cc = new CellConstraints();
|
417 |
jpanel1.setLayout(formlayout1); |
418 |
|
419 |
pnlCfgActions.setName("pnlCfgActions");
|
420 |
pnlCfgActions.setOpaque(false);
|
421 |
jpanel1.add(pnlCfgActions,cc.xy(7,1)); |
422 |
|
423 |
btnHistory.setActionCommand("...");
|
424 |
btnHistory.setName("btnHistory");
|
425 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
426 |
btnHistory.setBorder(emptyborder1); |
427 |
jpanel1.add(btnHistory,cc.xy(3,1)); |
428 |
|
429 |
btnBookmarks.setActionCommand("...");
|
430 |
btnBookmarks.setName("btnBookmarks");
|
431 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
432 |
btnBookmarks.setBorder(emptyborder2); |
433 |
jpanel1.add(btnBookmarks,cc.xy(5,1)); |
434 |
|
435 |
addFillComponents(jpanel1,new int[]{ 1,2,4,6 },new int[]{ 1 }); |
436 |
return jpanel1;
|
437 |
} |
438 |
|
439 |
/**
|
440 |
* Initializer
|
441 |
*/
|
442 |
protected void initializePanel() |
443 |
{ |
444 |
setLayout(new BorderLayout()); |
445 |
add(createPanel(), BorderLayout.CENTER);
|
446 |
} |
447 |
|
448 |
|
449 |
} |