svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.app / org.gvsig.app.mainplugin / src / main / java / org / gvsig / app / extension / copytable / CopyTable2PanelView.java @ 46629
History | View | Annotate | Download (23.7 KB)
1 |
package org.gvsig.app.extension.copytable; |
---|---|
2 |
|
3 |
import com.jeta.forms.components.separator.TitledSeparator; |
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.ButtonGroup; |
13 |
import javax.swing.ImageIcon; |
14 |
import javax.swing.JButton; |
15 |
import javax.swing.JCheckBox; |
16 |
import javax.swing.JComboBox; |
17 |
import javax.swing.JFrame; |
18 |
import javax.swing.JLabel; |
19 |
import javax.swing.JPanel; |
20 |
import javax.swing.JProgressBar; |
21 |
import javax.swing.JRadioButton; |
22 |
import javax.swing.JScrollPane; |
23 |
import javax.swing.JTabbedPane; |
24 |
import javax.swing.JTable; |
25 |
import javax.swing.JTextField; |
26 |
import javax.swing.JTree; |
27 |
import javax.swing.border.EmptyBorder; |
28 |
|
29 |
|
30 |
public class CopyTable2PanelView extends JPanel |
31 |
{ |
32 |
JTabbedPane jtabbedpane1 = new JTabbedPane(); |
33 |
JLabel lblSourceTable = new JLabel(); |
34 |
JTree treeSourceTable = new JTree(); |
35 |
JLabel lblSourceFilter = new JLabel(); |
36 |
JTextField txtSourceFilter = new JTextField(); |
37 |
JButton btnSourceFilter = new JButton(); |
38 |
JButton btnSourceFilterBookmarks = new JButton(); |
39 |
JButton btnSourceFilterHistory = new JButton(); |
40 |
JLabel lblSourceJoinField = new JLabel(); |
41 |
JComboBox cboSourceJoinField = new JComboBox(); |
42 |
JLabel lblTargetTable = new JLabel(); |
43 |
JTree treeTargetTable = new JTree(); |
44 |
TitledSeparator lblCopyMode = new TitledSeparator();
|
45 |
JLabel lblTargetJoinField = new JLabel(); |
46 |
JComboBox cboTargetJoinField = new JComboBox(); |
47 |
JCheckBox chkTargetInsertIfNotExistsInTarget = new JCheckBox(); |
48 |
JCheckBox chkTargetUpdateIfExistsInTarget = new JCheckBox(); |
49 |
JLabel lblTargetInsertIfNotExistsInTarget = new JLabel(); |
50 |
JLabel lblTargetUpdateIfExistsInTarget = new JLabel(); |
51 |
JLabel lblTargetDeleteIfNotExiststInSource = new JLabel(); |
52 |
JCheckBox chkTargetDeleteIfNotExiststInSource = new JCheckBox(); |
53 |
JLabel lblTargetOnlyWhen = new JLabel(); |
54 |
JTextField txtTargetUpdateWhenExpression = new JTextField(); |
55 |
JButton btnTargetUpdateWhenExpression = new JButton(); |
56 |
JButton btnTargetUpdateWhenExpressionBookmarks = new JButton(); |
57 |
JButton btnTargetUpdateWhenExpressionHistory = new JButton(); |
58 |
JLabel lblFieldsFieldsToCopy = new JLabel(); |
59 |
JTable tableFields = new JTable(); |
60 |
JRadioButton rdoOptionsFulledit = new JRadioButton(); |
61 |
ButtonGroup buttongroup1 = new ButtonGroup(); |
62 |
JRadioButton rdoOptionsPassthrought = new JRadioButton(); |
63 |
JCheckBox chkOptionsBeginEditIfNeed = new JCheckBox(); |
64 |
JCheckBox chkOptionsFinishEditAfterTerminate = new JCheckBox(); |
65 |
JCheckBox chkOptionsNotifyUserIfNeedBeginEditing = new JCheckBox(); |
66 |
JCheckBox chkOptionsFinishAndRestarEditEach = new JCheckBox(); |
67 |
JTextField txtOptionsFinishAndRestarEditEach = new JTextField(); |
68 |
JProgressBar pbStatus = new JProgressBar(); |
69 |
JLabel lblStatusLabel = new JLabel(); |
70 |
JLabel lblStatusMessage = new JLabel(); |
71 |
JButton btnHistory = new JButton(); |
72 |
JButton btnBookmarks = new JButton(); |
73 |
JButton btnConfigurableActions = new JButton(); |
74 |
|
75 |
/**
|
76 |
* Default constructor
|
77 |
*/
|
78 |
public CopyTable2PanelView()
|
79 |
{ |
80 |
initializePanel(); |
81 |
} |
82 |
|
83 |
/**
|
84 |
* Adds fill components to empty cells in the first row and first column of the grid.
|
85 |
* This ensures that the grid spacing will be the same as shown in the designer.
|
86 |
* @param cols an array of column indices in the first row where fill components should be added.
|
87 |
* @param rows an array of row indices in the first column where fill components should be added.
|
88 |
*/
|
89 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
90 |
{ |
91 |
Dimension filler = new Dimension(10,10); |
92 |
|
93 |
boolean filled_cell_11 = false; |
94 |
CellConstraints cc = new CellConstraints();
|
95 |
if ( cols.length > 0 && rows.length > 0 ) |
96 |
{ |
97 |
if ( cols[0] == 1 && rows[0] == 1 ) |
98 |
{ |
99 |
/** add a rigid area */
|
100 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
101 |
filled_cell_11 = true;
|
102 |
} |
103 |
} |
104 |
|
105 |
for( int index = 0; index < cols.length; index++ ) |
106 |
{ |
107 |
if ( cols[index] == 1 && filled_cell_11 ) |
108 |
{ |
109 |
continue;
|
110 |
} |
111 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
112 |
} |
113 |
|
114 |
for( int index = 0; index < rows.length; index++ ) |
115 |
{ |
116 |
if ( rows[index] == 1 && filled_cell_11 ) |
117 |
{ |
118 |
continue;
|
119 |
} |
120 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
121 |
} |
122 |
|
123 |
} |
124 |
|
125 |
/**
|
126 |
* Helper method to load an image file from the CLASSPATH
|
127 |
* @param imageName the package and name of the file to load relative to the CLASSPATH
|
128 |
* @return an ImageIcon instance with the specified image file
|
129 |
* @throws IllegalArgumentException if the image resource cannot be loaded.
|
130 |
*/
|
131 |
public ImageIcon loadImage( String imageName ) |
132 |
{ |
133 |
try
|
134 |
{ |
135 |
ClassLoader classloader = getClass().getClassLoader();
|
136 |
java.net.URL url = classloader.getResource( imageName ); |
137 |
if ( url != null ) |
138 |
{ |
139 |
ImageIcon icon = new ImageIcon( url ); |
140 |
return icon;
|
141 |
} |
142 |
} |
143 |
catch( Exception e ) |
144 |
{ |
145 |
e.printStackTrace(); |
146 |
} |
147 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
148 |
} |
149 |
|
150 |
/**
|
151 |
* Method for recalculating the component orientation for
|
152 |
* right-to-left Locales.
|
153 |
* @param orientation the component orientation to be applied
|
154 |
*/
|
155 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
156 |
{ |
157 |
// Not yet implemented...
|
158 |
// I18NUtils.applyComponentOrientation(this, orientation);
|
159 |
super.applyComponentOrientation(orientation);
|
160 |
} |
161 |
|
162 |
public JPanel createPanel() |
163 |
{ |
164 |
JPanel jpanel1 = new JPanel(); |
165 |
FormLayout formlayout1 = new FormLayout("FILL:8DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:8DLU:NONE","CENTER:4DLU:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:4DLU:NONE"); |
166 |
CellConstraints cc = new CellConstraints();
|
167 |
jpanel1.setLayout(formlayout1); |
168 |
|
169 |
jtabbedpane1.addTab("Origen",null,createPanel1()); |
170 |
jtabbedpane1.addTab("Destino",null,createPanel4()); |
171 |
jtabbedpane1.addTab("Campos",null,createPanel9()); |
172 |
jtabbedpane1.addTab("Opciones",null,createPanel10()); |
173 |
jpanel1.add(jtabbedpane1,cc.xy(2,3)); |
174 |
|
175 |
jpanel1.add(createPanel13(),cc.xy(2,4)); |
176 |
jpanel1.add(createPanel14(),new CellConstraints(2,2,1,1,CellConstraints.RIGHT,CellConstraints.DEFAULT)); |
177 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5 }); |
178 |
return jpanel1;
|
179 |
} |
180 |
|
181 |
public JPanel createPanel1() |
182 |
{ |
183 |
JPanel jpanel1 = new JPanel(); |
184 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU: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"); |
185 |
CellConstraints cc = new CellConstraints();
|
186 |
jpanel1.setLayout(formlayout1); |
187 |
|
188 |
lblSourceTable.setName("lblSourceTable");
|
189 |
lblSourceTable.setText("Tabla");
|
190 |
jpanel1.add(lblSourceTable,cc.xy(2,2)); |
191 |
|
192 |
treeSourceTable.setName("treeSourceTable");
|
193 |
treeSourceTable.setRootVisible(false);
|
194 |
treeSourceTable.setShowsRootHandles(true);
|
195 |
JScrollPane jscrollpane1 = new JScrollPane(); |
196 |
jscrollpane1.setViewportView(treeSourceTable); |
197 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
198 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
199 |
jpanel1.add(jscrollpane1,cc.xy(2,4)); |
200 |
|
201 |
lblSourceFilter.setName("lblSourceFilter");
|
202 |
lblSourceFilter.setText("Procesar solo los registros que cumpla la condicion:");
|
203 |
jpanel1.add(lblSourceFilter,cc.xy(2,8)); |
204 |
|
205 |
jpanel1.add(createPanel2(),cc.xy(2,10)); |
206 |
jpanel1.add(createPanel3(),cc.xy(2,6)); |
207 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 }); |
208 |
return jpanel1;
|
209 |
} |
210 |
|
211 |
public JPanel createPanel2() |
212 |
{ |
213 |
JPanel jpanel1 = new JPanel(); |
214 |
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"); |
215 |
CellConstraints cc = new CellConstraints();
|
216 |
jpanel1.setLayout(formlayout1); |
217 |
|
218 |
txtSourceFilter.setName("txtSourceFilter");
|
219 |
jpanel1.add(txtSourceFilter,cc.xy(1,1)); |
220 |
|
221 |
btnSourceFilter.setActionCommand("...");
|
222 |
btnSourceFilter.setName("btnSourceFilter");
|
223 |
btnSourceFilter.setText("...");
|
224 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
225 |
btnSourceFilter.setBorder(emptyborder1); |
226 |
jpanel1.add(btnSourceFilter,cc.xy(3,1)); |
227 |
|
228 |
btnSourceFilterBookmarks.setActionCommand("...");
|
229 |
btnSourceFilterBookmarks.setName("btnSourceFilterBookmarks");
|
230 |
btnSourceFilterBookmarks.setText("...");
|
231 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
232 |
btnSourceFilterBookmarks.setBorder(emptyborder2); |
233 |
jpanel1.add(btnSourceFilterBookmarks,cc.xy(5,1)); |
234 |
|
235 |
btnSourceFilterHistory.setActionCommand("...");
|
236 |
btnSourceFilterHistory.setName("btnSourceFilterHistory");
|
237 |
btnSourceFilterHistory.setText("...");
|
238 |
EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2); |
239 |
btnSourceFilterHistory.setBorder(emptyborder3); |
240 |
jpanel1.add(btnSourceFilterHistory,cc.xy(7,1)); |
241 |
|
242 |
addFillComponents(jpanel1,new int[]{ 2,4,6 },new int[0]); |
243 |
return jpanel1;
|
244 |
} |
245 |
|
246 |
public JPanel createPanel3() |
247 |
{ |
248 |
JPanel jpanel1 = new JPanel(); |
249 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:8DLU:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE"); |
250 |
CellConstraints cc = new CellConstraints();
|
251 |
jpanel1.setLayout(formlayout1); |
252 |
|
253 |
lblSourceJoinField.setName("lblSourceJoinField");
|
254 |
lblSourceJoinField.setText("Campo de enlace");
|
255 |
jpanel1.add(lblSourceJoinField,cc.xy(1,1)); |
256 |
|
257 |
cboSourceJoinField.setName("cboSourceJoinField");
|
258 |
jpanel1.add(cboSourceJoinField,cc.xy(3,1)); |
259 |
|
260 |
addFillComponents(jpanel1,new int[]{ 2 },new int[0]); |
261 |
return jpanel1;
|
262 |
} |
263 |
|
264 |
public JPanel createPanel4() |
265 |
{ |
266 |
JPanel jpanel1 = new JPanel(); |
267 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU: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"); |
268 |
CellConstraints cc = new CellConstraints();
|
269 |
jpanel1.setLayout(formlayout1); |
270 |
|
271 |
lblTargetTable.setName("lblTargetTable");
|
272 |
lblTargetTable.setText("Tabla");
|
273 |
jpanel1.add(lblTargetTable,cc.xy(2,2)); |
274 |
|
275 |
treeTargetTable.setName("treeTargetTable");
|
276 |
treeTargetTable.setRootVisible(false);
|
277 |
treeTargetTable.setShowsRootHandles(true);
|
278 |
JScrollPane jscrollpane1 = new JScrollPane(); |
279 |
jscrollpane1.setViewportView(treeTargetTable); |
280 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
281 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
282 |
jpanel1.add(jscrollpane1,cc.xy(2,4)); |
283 |
|
284 |
lblCopyMode.setName("lblCopyMode");
|
285 |
lblCopyMode.setText("Modo de copia");
|
286 |
jpanel1.add(lblCopyMode,cc.xy(2,8)); |
287 |
|
288 |
jpanel1.add(createPanel5(),cc.xy(2,6)); |
289 |
jpanel1.add(createPanel6(),cc.xy(2,10)); |
290 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 }); |
291 |
return jpanel1;
|
292 |
} |
293 |
|
294 |
public JPanel createPanel5() |
295 |
{ |
296 |
JPanel jpanel1 = new JPanel(); |
297 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:8DLU:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE"); |
298 |
CellConstraints cc = new CellConstraints();
|
299 |
jpanel1.setLayout(formlayout1); |
300 |
|
301 |
lblTargetJoinField.setName("lblTargetJoinField");
|
302 |
lblTargetJoinField.setText("Campo de enlace");
|
303 |
jpanel1.add(lblTargetJoinField,cc.xy(1,1)); |
304 |
|
305 |
cboTargetJoinField.setName("cboTargetJoinField");
|
306 |
jpanel1.add(cboTargetJoinField,cc.xy(3,1)); |
307 |
|
308 |
addFillComponents(jpanel1,new int[]{ 2 },new int[0]); |
309 |
return jpanel1;
|
310 |
} |
311 |
|
312 |
public JPanel createPanel6() |
313 |
{ |
314 |
JPanel jpanel1 = new JPanel(); |
315 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
316 |
CellConstraints cc = new CellConstraints();
|
317 |
jpanel1.setLayout(formlayout1); |
318 |
|
319 |
chkTargetInsertIfNotExistsInTarget.setName("chkTargetInsertIfNotExistsInTarget");
|
320 |
jpanel1.add(chkTargetInsertIfNotExistsInTarget,cc.xy(1,1)); |
321 |
|
322 |
chkTargetUpdateIfExistsInTarget.setName("chkTargetUpdateIfExistsInTarget");
|
323 |
jpanel1.add(chkTargetUpdateIfExistsInTarget,cc.xy(1,3)); |
324 |
|
325 |
lblTargetInsertIfNotExistsInTarget.setName("lblTargetInsertIfNotExistsInTarget");
|
326 |
lblTargetInsertIfNotExistsInTarget.setText("Insertar si no existe en el destino");
|
327 |
jpanel1.add(lblTargetInsertIfNotExistsInTarget,cc.xy(3,1)); |
328 |
|
329 |
lblTargetUpdateIfExistsInTarget.setName("lblTargetUpdateIfExistsInTarget");
|
330 |
lblTargetUpdateIfExistsInTarget.setText("Actualizar si existe en el destino");
|
331 |
jpanel1.add(lblTargetUpdateIfExistsInTarget,cc.xy(3,3)); |
332 |
|
333 |
lblTargetDeleteIfNotExiststInSource.setName("lblTargetDeleteIfNotExiststInSource");
|
334 |
lblTargetDeleteIfNotExiststInSource.setText("Borrar si no existe en el origen");
|
335 |
jpanel1.add(lblTargetDeleteIfNotExiststInSource,cc.xy(3,6)); |
336 |
|
337 |
chkTargetDeleteIfNotExiststInSource.setName("chkTargetDeleteIfNotExiststInSource");
|
338 |
jpanel1.add(chkTargetDeleteIfNotExiststInSource,cc.xy(1,6)); |
339 |
|
340 |
jpanel1.add(createPanel7(),cc.xy(3,4)); |
341 |
addFillComponents(jpanel1,new int[]{ 2 },new int[]{ 2,4,5 }); |
342 |
return jpanel1;
|
343 |
} |
344 |
|
345 |
public JPanel createPanel7() |
346 |
{ |
347 |
JPanel jpanel1 = new JPanel(); |
348 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","CENTER:12DLU:NONE,CENTER:20DLU:NONE"); |
349 |
CellConstraints cc = new CellConstraints();
|
350 |
jpanel1.setLayout(formlayout1); |
351 |
|
352 |
lblTargetOnlyWhen.setName("lblTargetOnlyWhen");
|
353 |
lblTargetOnlyWhen.setText("Solo cuando:");
|
354 |
jpanel1.add(lblTargetOnlyWhen,cc.xy(1,1)); |
355 |
|
356 |
jpanel1.add(createPanel8(),cc.xy(1,2)); |
357 |
addFillComponents(jpanel1,new int[0],new int[]{ 2 }); |
358 |
return jpanel1;
|
359 |
} |
360 |
|
361 |
public JPanel createPanel8() |
362 |
{ |
363 |
JPanel jpanel1 = new JPanel(); |
364 |
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"); |
365 |
CellConstraints cc = new CellConstraints();
|
366 |
jpanel1.setLayout(formlayout1); |
367 |
|
368 |
txtTargetUpdateWhenExpression.setName("txtTargetUpdateWhenExpression");
|
369 |
jpanel1.add(txtTargetUpdateWhenExpression,cc.xy(1,1)); |
370 |
|
371 |
btnTargetUpdateWhenExpression.setActionCommand("...");
|
372 |
btnTargetUpdateWhenExpression.setName("btnTargetUpdateWhenExpression");
|
373 |
btnTargetUpdateWhenExpression.setText("...");
|
374 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
375 |
btnTargetUpdateWhenExpression.setBorder(emptyborder1); |
376 |
jpanel1.add(btnTargetUpdateWhenExpression,cc.xy(3,1)); |
377 |
|
378 |
btnTargetUpdateWhenExpressionBookmarks.setActionCommand("...");
|
379 |
btnTargetUpdateWhenExpressionBookmarks.setName("btnTargetUpdateWhenExpressionBookmarks");
|
380 |
btnTargetUpdateWhenExpressionBookmarks.setText("...");
|
381 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
382 |
btnTargetUpdateWhenExpressionBookmarks.setBorder(emptyborder2); |
383 |
jpanel1.add(btnTargetUpdateWhenExpressionBookmarks,cc.xy(5,1)); |
384 |
|
385 |
btnTargetUpdateWhenExpressionHistory.setActionCommand("...");
|
386 |
btnTargetUpdateWhenExpressionHistory.setName("btnTargetUpdateWhenExpressionHistory");
|
387 |
btnTargetUpdateWhenExpressionHistory.setText("...");
|
388 |
EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2); |
389 |
btnTargetUpdateWhenExpressionHistory.setBorder(emptyborder3); |
390 |
jpanel1.add(btnTargetUpdateWhenExpressionHistory,cc.xy(7,1)); |
391 |
|
392 |
addFillComponents(jpanel1,new int[]{ 2,4,6 },new int[0]); |
393 |
return jpanel1;
|
394 |
} |
395 |
|
396 |
public JPanel createPanel9() |
397 |
{ |
398 |
JPanel jpanel1 = new JPanel(); |
399 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
400 |
CellConstraints cc = new CellConstraints();
|
401 |
jpanel1.setLayout(formlayout1); |
402 |
|
403 |
lblFieldsFieldsToCopy.setName("lblFieldsFieldsToCopy");
|
404 |
lblFieldsFieldsToCopy.setText("Campos a copiar");
|
405 |
jpanel1.add(lblFieldsFieldsToCopy,cc.xy(2,2)); |
406 |
|
407 |
tableFields.setName("tableFields");
|
408 |
JScrollPane jscrollpane1 = new JScrollPane(); |
409 |
jscrollpane1.setViewportView(tableFields); |
410 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
411 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
412 |
jpanel1.add(jscrollpane1,cc.xy(2,4)); |
413 |
|
414 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5 }); |
415 |
return jpanel1;
|
416 |
} |
417 |
|
418 |
public JPanel createPanel10() |
419 |
{ |
420 |
JPanel jpanel1 = new JPanel(); |
421 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","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"); |
422 |
CellConstraints cc = new CellConstraints();
|
423 |
jpanel1.setLayout(formlayout1); |
424 |
|
425 |
JLabel jlabel1 = new JLabel(); |
426 |
jlabel1.setText("Modo de edicion");
|
427 |
jpanel1.add(jlabel1,cc.xy(2,2)); |
428 |
|
429 |
rdoOptionsFulledit.setActionCommand("Modo standard");
|
430 |
rdoOptionsFulledit.setName("rdoOptionsFulledit");
|
431 |
rdoOptionsFulledit.setSelected(true);
|
432 |
rdoOptionsFulledit.setText("Modo standard");
|
433 |
buttongroup1.add(rdoOptionsFulledit); |
434 |
jpanel1.add(rdoOptionsFulledit,cc.xy(2,4)); |
435 |
|
436 |
rdoOptionsPassthrought.setActionCommand("Modo pass-throught");
|
437 |
rdoOptionsPassthrought.setName("rdoOptionsPassthrought");
|
438 |
rdoOptionsPassthrought.setText("Modo pass-throught");
|
439 |
buttongroup1.add(rdoOptionsPassthrought); |
440 |
jpanel1.add(rdoOptionsPassthrought,cc.xy(2,8)); |
441 |
|
442 |
jpanel1.add(createPanel11(),cc.xy(2,6)); |
443 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
444 |
return jpanel1;
|
445 |
} |
446 |
|
447 |
public JPanel createPanel11() |
448 |
{ |
449 |
JPanel jpanel1 = new JPanel(); |
450 |
FormLayout formlayout1 = new FormLayout("FILL:12DLU:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
451 |
CellConstraints cc = new CellConstraints();
|
452 |
jpanel1.setLayout(formlayout1); |
453 |
|
454 |
chkOptionsBeginEditIfNeed.setActionCommand("Iniciar edicion si la tabla no esta en edicion");
|
455 |
chkOptionsBeginEditIfNeed.setName("chkOptionsBeginEditIfNeed");
|
456 |
chkOptionsBeginEditIfNeed.setSelected(true);
|
457 |
chkOptionsBeginEditIfNeed.setText("Iniciar edicion si la tabla no esta en edicion");
|
458 |
jpanel1.add(chkOptionsBeginEditIfNeed,cc.xy(2,3)); |
459 |
|
460 |
chkOptionsFinishEditAfterTerminate.setActionCommand("Terminar edicion al finalizar");
|
461 |
chkOptionsFinishEditAfterTerminate.setName("chkOptionsFinishEditAfterTerminate");
|
462 |
chkOptionsFinishEditAfterTerminate.setSelected(true);
|
463 |
chkOptionsFinishEditAfterTerminate.setText("Terminar edicion al finalizar");
|
464 |
jpanel1.add(chkOptionsFinishEditAfterTerminate,cc.xy(2,5)); |
465 |
|
466 |
chkOptionsNotifyUserIfNeedBeginEditing.setActionCommand("Avisar al usuario si la tabla ya esta en edicion.");
|
467 |
chkOptionsNotifyUserIfNeedBeginEditing.setName("chkOptionsNotifyUserIfNeedBeginEditing");
|
468 |
chkOptionsNotifyUserIfNeedBeginEditing.setSelected(true);
|
469 |
chkOptionsNotifyUserIfNeedBeginEditing.setText("Avisar al usuario si la tabla ya esta en edicion.");
|
470 |
jpanel1.add(chkOptionsNotifyUserIfNeedBeginEditing,cc.xy(2,7)); |
471 |
|
472 |
jpanel1.add(createPanel12(),cc.xy(2,1)); |
473 |
addFillComponents(jpanel1,new int[]{ 1,2 },new int[]{ 1,2,3,4,5,6,7 }); |
474 |
return jpanel1;
|
475 |
} |
476 |
|
477 |
public JPanel createPanel12() |
478 |
{ |
479 |
JPanel jpanel1 = new JPanel(); |
480 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:MAX(50DLU;DEFAULT):NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
481 |
CellConstraints cc = new CellConstraints();
|
482 |
jpanel1.setLayout(formlayout1); |
483 |
|
484 |
chkOptionsFinishAndRestarEditEach.setActionCommand("Reiniciar edicion cada");
|
485 |
chkOptionsFinishAndRestarEditEach.setName("chkOptionsFinishAndRestarEditEach");
|
486 |
chkOptionsFinishAndRestarEditEach.setSelected(true);
|
487 |
chkOptionsFinishAndRestarEditEach.setText("Terminar edicion y reiniciarla cada");
|
488 |
jpanel1.add(chkOptionsFinishAndRestarEditEach,cc.xy(1,1)); |
489 |
|
490 |
txtOptionsFinishAndRestarEditEach.setName("txtOptionsFinishAndRestarEditEach");
|
491 |
txtOptionsFinishAndRestarEditEach.setSelectionEnd(5);
|
492 |
txtOptionsFinishAndRestarEditEach.setSelectionStart(5);
|
493 |
txtOptionsFinishAndRestarEditEach.setText("10000");
|
494 |
jpanel1.add(txtOptionsFinishAndRestarEditEach,cc.xy(3,1)); |
495 |
|
496 |
JLabel jlabel1 = new JLabel(); |
497 |
jlabel1.setText("cambios");
|
498 |
jpanel1.add(jlabel1,cc.xy(5,1)); |
499 |
|
500 |
addFillComponents(jpanel1,new int[]{ 2,4 },new int[0]); |
501 |
return jpanel1;
|
502 |
} |
503 |
|
504 |
public JPanel createPanel13() |
505 |
{ |
506 |
JPanel jpanel1 = new JPanel(); |
507 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
508 |
CellConstraints cc = new CellConstraints();
|
509 |
jpanel1.setLayout(formlayout1); |
510 |
|
511 |
pbStatus.setName("pbStatus");
|
512 |
pbStatus.setValue(25);
|
513 |
jpanel1.add(pbStatus,cc.xy(1,2)); |
514 |
|
515 |
lblStatusLabel.setName("lblStatusLabel");
|
516 |
lblStatusLabel.setText("Inicializando interface de usuario...");
|
517 |
jpanel1.add(lblStatusLabel,cc.xy(1,1)); |
518 |
|
519 |
lblStatusMessage.setName("lblStatusMessage");
|
520 |
lblStatusMessage.setText("Inicializando interface de usuario...");
|
521 |
jpanel1.add(lblStatusMessage,cc.xy(1,3)); |
522 |
|
523 |
addFillComponents(jpanel1,new int[0],new int[0]); |
524 |
return jpanel1;
|
525 |
} |
526 |
|
527 |
public JPanel createPanel14() |
528 |
{ |
529 |
JPanel jpanel1 = new JPanel(); |
530 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
531 |
CellConstraints cc = new CellConstraints();
|
532 |
jpanel1.setLayout(formlayout1); |
533 |
|
534 |
btnHistory.setActionCommand("...");
|
535 |
btnHistory.setName("btnHistory");
|
536 |
btnHistory.setOpaque(false);
|
537 |
btnHistory.setText("...");
|
538 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
539 |
btnHistory.setBorder(emptyborder1); |
540 |
jpanel1.add(btnHistory,cc.xy(1,1)); |
541 |
|
542 |
btnBookmarks.setActionCommand("...");
|
543 |
btnBookmarks.setName("btnBookmarks");
|
544 |
btnBookmarks.setOpaque(false);
|
545 |
btnBookmarks.setText("...");
|
546 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
547 |
btnBookmarks.setBorder(emptyborder2); |
548 |
jpanel1.add(btnBookmarks,cc.xy(3,1)); |
549 |
|
550 |
btnConfigurableActions.setActionCommand("...");
|
551 |
btnConfigurableActions.setName("btnConfigurableActions");
|
552 |
btnConfigurableActions.setOpaque(false);
|
553 |
btnConfigurableActions.setText("...");
|
554 |
EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2); |
555 |
btnConfigurableActions.setBorder(emptyborder3); |
556 |
jpanel1.add(btnConfigurableActions,cc.xy(5,1)); |
557 |
|
558 |
addFillComponents(jpanel1,new int[]{ 2,4 },new int[0]); |
559 |
return jpanel1;
|
560 |
} |
561 |
|
562 |
/**
|
563 |
* Initializer
|
564 |
*/
|
565 |
protected void initializePanel() |
566 |
{ |
567 |
setLayout(new BorderLayout()); |
568 |
add(createPanel(), BorderLayout.CENTER);
|
569 |
} |
570 |
|
571 |
|
572 |
} |