Revision 43987 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/java/org/gvsig/expressionevaluator/swing/impl/DefaultJExpressionBuilderView.java
DefaultJExpressionBuilderView.java | ||
---|---|---|
31 | 31 |
JList lstSimpleElement = new JList(); |
32 | 32 |
JTextArea txtExpression = new JTextArea(); |
33 | 33 |
JButton btnEq = new JButton(); |
34 |
JButton btnNeq = new JButton(); |
|
34 | 35 |
JButton btnAdd = new JButton(); |
35 | 36 |
JButton btnSubst = new JButton(); |
36 | 37 |
JButton btnMult = new JButton(); |
37 | 38 |
JButton btnDiv = new JButton(); |
38 | 39 |
JButton btnParentOpen = new JButton(); |
39 | 40 |
JButton btnParentClose = new JButton(); |
40 |
JButton btnNeq = new JButton(); |
|
41 | 41 |
JTree treeElements = new JTree(); |
42 | 42 |
JEditorPane txtDescription = new JEditorPane(); |
43 | 43 |
JTextField txtGroupElement = new JTextField(); |
... | ... | |
46 | 46 |
JButton btnSimpleElementSortDown = new JButton(); |
47 | 47 |
JButton btnSimpleElementSortUp = new JButton(); |
48 | 48 |
JLabel lblSimpleElementsMsg = new JLabel(); |
49 |
JButton btnSimpleElementTimeLimit = new JButton(); |
|
49 | 50 |
JTextField txtSimpleElementFilter = new JTextField(); |
50 | 51 |
JButton btnSimpleElementFilter = new JButton(); |
51 | 52 |
JPanel pnlScriptEditorContainer = new JPanel(); |
... | ... | |
159 | 160 |
public JPanel createPanel1() |
160 | 161 |
{ |
161 | 162 |
JPanel jpanel1 = new JPanel(); |
162 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:80DLU:NONE,FILL:4DLU:NONE,FILL:100DLU:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.3),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE");
|
|
163 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:80DLU:GROW(0.2),FILL:4DLU:NONE,FILL:100DLU:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.8),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE");
|
|
163 | 164 |
CellConstraints cc = new CellConstraints(); |
164 | 165 |
jpanel1.setLayout(formlayout1); |
165 | 166 |
|
... | ... | |
196 | 197 |
public JPanel createPanel2() |
197 | 198 |
{ |
198 | 199 |
JPanel jpanel1 = new JPanel(); |
199 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:GROW(1.0)");
|
|
200 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:NONE");
|
|
200 | 201 |
CellConstraints cc = new CellConstraints(); |
201 | 202 |
jpanel1.setLayout(formlayout1); |
202 | 203 |
|
203 | 204 |
txtExpression.setName("txtExpression"); |
205 |
txtExpression.setRows(2); |
|
204 | 206 |
JScrollPane jscrollpane1 = new JScrollPane(); |
205 | 207 |
jscrollpane1.setViewportView(txtExpression); |
206 | 208 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); |
... | ... | |
215 | 217 |
public JPanel createPanel3() |
216 | 218 |
{ |
217 | 219 |
JPanel jpanel1 = new JPanel(); |
218 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE");
|
|
220 |
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:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE");
|
|
219 | 221 |
CellConstraints cc = new CellConstraints(); |
220 | 222 |
jpanel1.setLayout(formlayout1); |
221 | 223 |
|
... | ... | |
226 | 228 |
btnEq.setBorder(emptyborder1); |
227 | 229 |
jpanel1.add(btnEq,cc.xy(1,1)); |
228 | 230 |
|
231 |
btnNeq.setActionCommand("+"); |
|
232 |
btnNeq.setName("btnNeq"); |
|
233 |
btnNeq.setText("<>"); |
|
234 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
|
235 |
btnNeq.setBorder(emptyborder2); |
|
236 |
jpanel1.add(btnNeq,cc.xy(3,1)); |
|
237 |
|
|
229 | 238 |
btnAdd.setActionCommand("+"); |
230 | 239 |
btnAdd.setName("btnAdd"); |
231 | 240 |
btnAdd.setText("+"); |
232 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2);
|
|
233 |
btnAdd.setBorder(emptyborder2);
|
|
234 |
jpanel1.add(btnAdd,cc.xy(1,3));
|
|
241 |
EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2);
|
|
242 |
btnAdd.setBorder(emptyborder3);
|
|
243 |
jpanel1.add(btnAdd,cc.xy(5,1));
|
|
235 | 244 |
|
236 | 245 |
btnSubst.setActionCommand("+"); |
237 | 246 |
btnSubst.setName("btnSubst"); |
238 | 247 |
btnSubst.setText("-"); |
239 |
EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2);
|
|
240 |
btnSubst.setBorder(emptyborder3);
|
|
241 |
jpanel1.add(btnSubst,cc.xy(3,3));
|
|
248 |
EmptyBorder emptyborder4 = new EmptyBorder(2,2,2,2);
|
|
249 |
btnSubst.setBorder(emptyborder4);
|
|
250 |
jpanel1.add(btnSubst,cc.xy(7,1));
|
|
242 | 251 |
|
243 | 252 |
btnMult.setActionCommand("+"); |
244 | 253 |
btnMult.setName("btnMult"); |
245 | 254 |
btnMult.setText("*"); |
246 |
EmptyBorder emptyborder4 = new EmptyBorder(2,2,2,2);
|
|
247 |
btnMult.setBorder(emptyborder4);
|
|
248 |
jpanel1.add(btnMult,cc.xy(1,5));
|
|
255 |
EmptyBorder emptyborder5 = new EmptyBorder(2,2,2,2);
|
|
256 |
btnMult.setBorder(emptyborder5);
|
|
257 |
jpanel1.add(btnMult,cc.xy(1,3));
|
|
249 | 258 |
|
250 | 259 |
btnDiv.setActionCommand("+"); |
251 | 260 |
btnDiv.setName("btnDiv"); |
252 | 261 |
btnDiv.setText("/"); |
253 |
EmptyBorder emptyborder5 = new EmptyBorder(2,2,2,2);
|
|
254 |
btnDiv.setBorder(emptyborder5);
|
|
255 |
jpanel1.add(btnDiv,cc.xy(3,5));
|
|
262 |
EmptyBorder emptyborder6 = new EmptyBorder(2,2,2,2);
|
|
263 |
btnDiv.setBorder(emptyborder6);
|
|
264 |
jpanel1.add(btnDiv,cc.xy(3,3));
|
|
256 | 265 |
|
257 | 266 |
btnParentOpen.setActionCommand("+"); |
258 | 267 |
btnParentOpen.setName("btnParentOpen"); |
259 | 268 |
btnParentOpen.setText("("); |
260 |
EmptyBorder emptyborder6 = new EmptyBorder(2,2,2,2);
|
|
261 |
btnParentOpen.setBorder(emptyborder6);
|
|
262 |
jpanel1.add(btnParentOpen,cc.xy(1,7));
|
|
269 |
EmptyBorder emptyborder7 = new EmptyBorder(2,2,2,2);
|
|
270 |
btnParentOpen.setBorder(emptyborder7);
|
|
271 |
jpanel1.add(btnParentOpen,cc.xy(5,3));
|
|
263 | 272 |
|
264 | 273 |
btnParentClose.setActionCommand("+"); |
265 | 274 |
btnParentClose.setName("btnParentClose"); |
266 | 275 |
btnParentClose.setText(")"); |
267 |
EmptyBorder emptyborder7 = new EmptyBorder(2,2,2,2); |
|
268 |
btnParentClose.setBorder(emptyborder7); |
|
269 |
jpanel1.add(btnParentClose,cc.xy(3,7)); |
|
270 |
|
|
271 |
btnNeq.setActionCommand("+"); |
|
272 |
btnNeq.setName("btnNeq"); |
|
273 |
btnNeq.setText("<>"); |
|
274 | 276 |
EmptyBorder emptyborder8 = new EmptyBorder(2,2,2,2); |
275 |
btnNeq.setBorder(emptyborder8);
|
|
276 |
jpanel1.add(btnNeq,cc.xy(3,1));
|
|
277 |
btnParentClose.setBorder(emptyborder8);
|
|
278 |
jpanel1.add(btnParentClose,cc.xy(7,3));
|
|
277 | 279 |
|
278 |
addFillComponents(jpanel1,new int[]{ 2 },new int[]{ 2,4,6 });
|
|
280 |
addFillComponents(jpanel1,new int[]{ 2,4,6,8 },new int[]{ 2,4 });
|
|
279 | 281 |
return jpanel1; |
280 | 282 |
} |
281 | 283 |
|
... | ... | |
305 | 307 |
public JPanel createPanel5() |
306 | 308 |
{ |
307 | 309 |
JPanel jpanel1 = new JPanel(); |
308 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:PREF:NONE"); |
|
310 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:PREF:NONE");
|
|
309 | 311 |
CellConstraints cc = new CellConstraints(); |
310 | 312 |
jpanel1.setLayout(formlayout1); |
311 | 313 |
|
... | ... | |
314 | 316 |
btnSimpleElementInsert.setName("btnSimpleElementInsert"); |
315 | 317 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
316 | 318 |
btnSimpleElementInsert.setBorder(emptyborder1); |
317 |
jpanel1.add(btnSimpleElementInsert,cc.xy(6,1));
|
|
319 |
jpanel1.add(btnSimpleElementInsert,cc.xy(8,1));
|
|
318 | 320 |
|
319 | 321 |
btnSimpleElementSortDown.setActionCommand("+"); |
320 | 322 |
btnSimpleElementSortDown.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-sortdown.png")); |
321 | 323 |
btnSimpleElementSortDown.setName("btnSimpleElementSortDown"); |
322 | 324 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
323 | 325 |
btnSimpleElementSortDown.setBorder(emptyborder2); |
324 |
jpanel1.add(btnSimpleElementSortDown,cc.xy(4,1));
|
|
326 |
jpanel1.add(btnSimpleElementSortDown,cc.xy(6,1));
|
|
325 | 327 |
|
326 | 328 |
btnSimpleElementSortUp.setActionCommand("+"); |
327 | 329 |
btnSimpleElementSortUp.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-sortup.png")); |
328 | 330 |
btnSimpleElementSortUp.setName("btnSimpleElementSortUp"); |
329 | 331 |
EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2); |
330 | 332 |
btnSimpleElementSortUp.setBorder(emptyborder3); |
331 |
jpanel1.add(btnSimpleElementSortUp,cc.xy(2,1));
|
|
333 |
jpanel1.add(btnSimpleElementSortUp,cc.xy(4,1));
|
|
332 | 334 |
|
333 | 335 |
lblSimpleElementsMsg.setName("lblSimpleElementsMsg"); |
334 | 336 |
jpanel1.add(lblSimpleElementsMsg,cc.xy(1,1)); |
335 | 337 |
|
336 |
addFillComponents(jpanel1,new int[]{ 3,5 },new int[0]); |
|
338 |
btnSimpleElementTimeLimit.setActionCommand("+"); |
|
339 |
btnSimpleElementTimeLimit.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.swing/org.gvsig.expressionevaluator.swing.impl/src/main/resources/org/gvsig/expressionevaluator/swing/impl/expressionbuilder-time-limit.png")); |
|
340 |
btnSimpleElementTimeLimit.setName("btnSimpleElementTimeLimit"); |
|
341 |
EmptyBorder emptyborder4 = new EmptyBorder(2,2,2,2); |
|
342 |
btnSimpleElementTimeLimit.setBorder(emptyborder4); |
|
343 |
jpanel1.add(btnSimpleElementTimeLimit,cc.xy(2,1)); |
|
344 |
|
|
345 |
addFillComponents(jpanel1,new int[]{ 3,5,7 },new int[0]); |
|
337 | 346 |
return jpanel1; |
338 | 347 |
} |
339 | 348 |
|
Also available in: Unified diff