gvsig-projects-pool / org.gvsig.online / trunk / org.gvsig.online / org.gvsig.online.app / org.gvsig.online.app.mainplugin / src / main / java / org / gvsig / online / app / mainplugin / addlayer / AbstractWizardOnlineView.java @ 9518
History | View | Annotate | Download (23.8 KB)
1 |
package org.gvsig.online.app.mainplugin.addlayer; |
---|---|
2 |
|
3 |
import com.jeta.forms.components.border.TitledBorderLabel; |
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.ImageIcon; |
13 |
import javax.swing.JButton; |
14 |
import javax.swing.JCheckBox; |
15 |
import javax.swing.JComboBox; |
16 |
import javax.swing.JFrame; |
17 |
import javax.swing.JLabel; |
18 |
import javax.swing.JList; |
19 |
import javax.swing.JPanel; |
20 |
import javax.swing.JProgressBar; |
21 |
import javax.swing.JScrollPane; |
22 |
import javax.swing.JTabbedPane; |
23 |
import javax.swing.JTextField; |
24 |
import javax.swing.JTree; |
25 |
import javax.swing.border.EmptyBorder; |
26 |
|
27 |
|
28 |
public class AbstractWizardOnlineView extends JPanel |
29 |
{ |
30 |
TitledBorderLabel lblTable = new TitledBorderLabel();
|
31 |
TitledBorderLabel lblColumns = new TitledBorderLabel();
|
32 |
JList lstColumns = new JList(); |
33 |
JTree treeTables = new JTree(); |
34 |
JButton btnDeselectAllColumns = new JButton(); |
35 |
JButton btnSelectAllColumns = new JButton(); |
36 |
JButton btnTablesFilter = new JButton(); |
37 |
JTextField txtTablesFilter = new JTextField(); |
38 |
JButton btnCheckout = new JButton(); |
39 |
JButton btnTablesCheckAll = new JButton(); |
40 |
JButton btnTablesUncheckAll = new JButton(); |
41 |
JButton btnTablesCollapseAll = new JButton(); |
42 |
JButton btnTablesExpandAll = new JButton(); |
43 |
JComboBox cboWorkspaces = new JComboBox(); |
44 |
JButton btnAddWorkspace = new JButton(); |
45 |
JButton btnInitWorkspace = new JButton(); |
46 |
JLabel lblWorkspace = new JLabel(); |
47 |
JLabel lblStatusTitle = new JLabel(); |
48 |
JProgressBar pbStatus = new JProgressBar(); |
49 |
JLabel lblStatusMessages = new JLabel(); |
50 |
JButton btnAdvancedProperties = new JButton(); |
51 |
JCheckBox chkMaintainStructureInToC = new JCheckBox(); |
52 |
JCheckBox chkCheckScale = new JCheckBox(); |
53 |
JCheckBox chkAddToCWhenLoadingAll = new JCheckBox(); |
54 |
JLabel lblReadOnlyNotification = new JLabel(); |
55 |
JButton btnConnectToModel = new JButton(); |
56 |
JTabbedPane tabTableInfo = new JTabbedPane(); |
57 |
JLabel lblName = new JLabel(); |
58 |
JTextField txtName = new JTextField(); |
59 |
JLabel lblIdField = new JLabel(); |
60 |
JComboBox cboIdField = new JComboBox(); |
61 |
JLabel lblGeometryField = new JLabel(); |
62 |
JComboBox cboGeometryField = new JComboBox(); |
63 |
JLabel lblProjection = new JLabel(); |
64 |
JTextField txtProjection = new JTextField(); |
65 |
JButton btnProjection = new JButton(); |
66 |
JButton btnChangeViewProjection = new JButton(); |
67 |
JLabel lblFilter = new JLabel(); |
68 |
JTextField txtFilter = new JTextField(); |
69 |
JButton btnFilter = new JButton(); |
70 |
JButton btnFilterBookmarks = new JButton(); |
71 |
JButton btnFilterHistory = new JButton(); |
72 |
JLabel lblVisible = new JLabel(); |
73 |
JCheckBox chkVisible = new JCheckBox(); |
74 |
|
75 |
/**
|
76 |
* Default constructor
|
77 |
*/
|
78 |
public AbstractWizardOnlineView()
|
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:4DLU:NONE,FILL:8DLU:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
166 |
CellConstraints cc = new CellConstraints();
|
167 |
jpanel1.setLayout(formlayout1); |
168 |
|
169 |
jpanel1.add(createPanel1(),cc.xy(2,4)); |
170 |
jpanel1.add(createPanel5(),cc.xy(2,2)); |
171 |
jpanel1.add(createPanel6(),cc.xy(2,10)); |
172 |
jpanel1.add(createPanel7(),cc.xy(2,9)); |
173 |
tabTableInfo.setName("tabTableInfo");
|
174 |
tabTableInfo.addTab("_General",null,createPanel9()); |
175 |
tabTableInfo.addTab("_Others",null,createPanel12()); |
176 |
jpanel1.add(tabTableInfo,cc.xy(2,7)); |
177 |
|
178 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 }); |
179 |
return jpanel1;
|
180 |
} |
181 |
|
182 |
public JPanel createPanel1() |
183 |
{ |
184 |
JPanel jpanel1 = new JPanel(); |
185 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(0.5),FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.5)","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
186 |
CellConstraints cc = new CellConstraints();
|
187 |
jpanel1.setLayout(formlayout1); |
188 |
|
189 |
lblTable.setName("lblTable");
|
190 |
lblTable.setText("choose_table");
|
191 |
jpanel1.add(lblTable,cc.xy(1,1)); |
192 |
|
193 |
lblColumns.setName("lblColumns");
|
194 |
lblColumns.setText("table_fields");
|
195 |
jpanel1.add(lblColumns,cc.xy(3,1)); |
196 |
|
197 |
lstColumns.setName("lstColumns");
|
198 |
JScrollPane jscrollpane1 = new JScrollPane(); |
199 |
jscrollpane1.setViewportView(lstColumns); |
200 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
201 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
202 |
jpanel1.add(jscrollpane1,cc.xywh(3,3,1,3)); |
203 |
|
204 |
treeTables.setName("treeTables");
|
205 |
treeTables.setRootVisible(false);
|
206 |
JScrollPane jscrollpane2 = new JScrollPane(); |
207 |
jscrollpane2.setViewportView(treeTables); |
208 |
jscrollpane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
209 |
jscrollpane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
210 |
jpanel1.add(jscrollpane2,cc.xy(1,5)); |
211 |
|
212 |
jpanel1.add(createPanel2(),cc.xy(3,7)); |
213 |
jpanel1.add(createPanel3(),cc.xy(1,3)); |
214 |
jpanel1.add(createPanel4(),cc.xy(1,7)); |
215 |
addFillComponents(jpanel1,new int[]{ 2 },new int[]{ 2,3,4,6,7 }); |
216 |
return jpanel1;
|
217 |
} |
218 |
|
219 |
public JPanel createPanel2() |
220 |
{ |
221 |
JPanel jpanel1 = new JPanel(); |
222 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
223 |
CellConstraints cc = new CellConstraints();
|
224 |
jpanel1.setLayout(formlayout1); |
225 |
|
226 |
btnDeselectAllColumns.setActionCommand("Ninguno");
|
227 |
btnDeselectAllColumns.setName("btnDeselectAllColumns");
|
228 |
btnDeselectAllColumns.setText("_None");
|
229 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
230 |
btnDeselectAllColumns.setBorder(emptyborder1); |
231 |
jpanel1.add(btnDeselectAllColumns,cc.xy(4,1)); |
232 |
|
233 |
btnSelectAllColumns.setActionCommand("Todos");
|
234 |
btnSelectAllColumns.setName("btnSelectAllColumns");
|
235 |
btnSelectAllColumns.setText("_All");
|
236 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
237 |
btnSelectAllColumns.setBorder(emptyborder2); |
238 |
jpanel1.add(btnSelectAllColumns,cc.xy(2,1)); |
239 |
|
240 |
addFillComponents(jpanel1,new int[]{ 1,3 },new int[]{ 1 }); |
241 |
return jpanel1;
|
242 |
} |
243 |
|
244 |
public JPanel createPanel3() |
245 |
{ |
246 |
JPanel jpanel1 = new JPanel(); |
247 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
248 |
CellConstraints cc = new CellConstraints();
|
249 |
jpanel1.setLayout(formlayout1); |
250 |
|
251 |
btnTablesFilter.setActionCommand("...");
|
252 |
btnTablesFilter.setName("btnTablesFilter");
|
253 |
btnTablesFilter.setText("...");
|
254 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
255 |
btnTablesFilter.setBorder(emptyborder1); |
256 |
jpanel1.add(btnTablesFilter,cc.xy(3,1)); |
257 |
|
258 |
txtTablesFilter.setName("txtTablesFilter");
|
259 |
jpanel1.add(txtTablesFilter,cc.xy(1,1)); |
260 |
|
261 |
addFillComponents(jpanel1,new int[]{ 2 },new int[0]); |
262 |
return jpanel1;
|
263 |
} |
264 |
|
265 |
public JPanel createPanel4() |
266 |
{ |
267 |
JPanel jpanel1 = new JPanel(); |
268 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
269 |
CellConstraints cc = new CellConstraints();
|
270 |
jpanel1.setLayout(formlayout1); |
271 |
|
272 |
btnCheckout.setActionCommand("...");
|
273 |
btnCheckout.setIcon(loadImage("src/main/resources/org/gvsig/vcsgis/swing/impl/images/vcsgis-common-checkout.png"));
|
274 |
btnCheckout.setName("btnCheckout");
|
275 |
btnCheckout.setToolTipText("_VCS_Checkout");
|
276 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
277 |
btnCheckout.setBorder(emptyborder1); |
278 |
jpanel1.add(btnCheckout,cc.xy(6,1)); |
279 |
|
280 |
btnTablesCheckAll.setActionCommand("...");
|
281 |
btnTablesCheckAll.setEnabled(false);
|
282 |
btnTablesCheckAll.setIcon(loadImage("src/main/resources/org/gvsig/vcsgis/swing/impl/images/common-check-on.png"));
|
283 |
btnTablesCheckAll.setName("btnTablesCheckAll");
|
284 |
btnTablesCheckAll.setOpaque(false);
|
285 |
btnTablesCheckAll.setRolloverEnabled(true);
|
286 |
btnTablesCheckAll.setToolTipText("_Select_all");
|
287 |
EmptyBorder emptyborder2 = new EmptyBorder(1,1,1,1); |
288 |
btnTablesCheckAll.setBorder(emptyborder2); |
289 |
jpanel1.add(btnTablesCheckAll,cc.xy(1,1)); |
290 |
|
291 |
btnTablesUncheckAll.setActionCommand("...");
|
292 |
btnTablesUncheckAll.setEnabled(false);
|
293 |
btnTablesUncheckAll.setIcon(loadImage("src/main/resources/org/gvsig/vcsgis/swing/impl/images/common-check-off.png"));
|
294 |
btnTablesUncheckAll.setName("btnTablesUncheckAll");
|
295 |
btnTablesUncheckAll.setOpaque(false);
|
296 |
btnTablesUncheckAll.setRolloverEnabled(true);
|
297 |
btnTablesUncheckAll.setToolTipText("_Unselect_all");
|
298 |
EmptyBorder emptyborder3 = new EmptyBorder(1,1,1,1); |
299 |
btnTablesUncheckAll.setBorder(emptyborder3); |
300 |
jpanel1.add(btnTablesUncheckAll,cc.xy(2,1)); |
301 |
|
302 |
btnTablesCollapseAll.setActionCommand("...");
|
303 |
btnTablesCollapseAll.setEnabled(false);
|
304 |
btnTablesCollapseAll.setIcon(loadImage("addons/SQLWorkbenchJ/common-collapse-all.png"));
|
305 |
btnTablesCollapseAll.setName("btnTablesCollapseAll");
|
306 |
btnTablesCollapseAll.setOpaque(false);
|
307 |
btnTablesCollapseAll.setRolloverEnabled(true);
|
308 |
btnTablesCollapseAll.setToolTipText("_Collapse_all");
|
309 |
EmptyBorder emptyborder4 = new EmptyBorder(1,1,1,1); |
310 |
btnTablesCollapseAll.setBorder(emptyborder4); |
311 |
jpanel1.add(btnTablesCollapseAll,cc.xy(3,1)); |
312 |
|
313 |
btnTablesExpandAll.setActionCommand("...");
|
314 |
btnTablesExpandAll.setEnabled(false);
|
315 |
btnTablesExpandAll.setIcon(loadImage("addons/SQLWorkbenchJ/common-expand-all.png"));
|
316 |
btnTablesExpandAll.setName("btnTablesExpandAll");
|
317 |
btnTablesExpandAll.setOpaque(false);
|
318 |
btnTablesExpandAll.setRolloverEnabled(true);
|
319 |
btnTablesExpandAll.setToolTipText("_Expand_all");
|
320 |
EmptyBorder emptyborder5 = new EmptyBorder(1,1,1,1); |
321 |
btnTablesExpandAll.setBorder(emptyborder5); |
322 |
jpanel1.add(btnTablesExpandAll,cc.xy(4,1)); |
323 |
|
324 |
addFillComponents(jpanel1,new int[]{ 5 },new int[0]); |
325 |
return jpanel1;
|
326 |
} |
327 |
|
328 |
public JPanel createPanel5() |
329 |
{ |
330 |
JPanel jpanel1 = new JPanel(); |
331 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
332 |
CellConstraints cc = new CellConstraints();
|
333 |
jpanel1.setLayout(formlayout1); |
334 |
|
335 |
cboWorkspaces.setName("cboWorkspaces");
|
336 |
jpanel1.add(cboWorkspaces,cc.xy(3,1)); |
337 |
|
338 |
btnAddWorkspace.setActionCommand("...");
|
339 |
btnAddWorkspace.setName("btnAddWorkspace");
|
340 |
btnAddWorkspace.setText("...");
|
341 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
342 |
btnAddWorkspace.setBorder(emptyborder1); |
343 |
jpanel1.add(btnAddWorkspace,cc.xy(5,1)); |
344 |
|
345 |
btnInitWorkspace.setActionCommand("...");
|
346 |
btnInitWorkspace.setIcon(loadImage("src/main/resources/org/gvsig/vcsgis/swing/impl/images/vcsgis-common-init-workspace.png"));
|
347 |
btnInitWorkspace.setName("btnInitWorkspace");
|
348 |
btnInitWorkspace.setToolTipText("_If_you_cant_find_the_layer_click_here_to_initialize_a_new_workingcopy");
|
349 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
350 |
btnInitWorkspace.setBorder(emptyborder2); |
351 |
btnInitWorkspace.setHorizontalTextPosition(JButton.LEFT);
|
352 |
jpanel1.add(btnInitWorkspace,cc.xy(7,1)); |
353 |
|
354 |
lblWorkspace.setName("lblWorkspace");
|
355 |
lblWorkspace.setText("_Workingcopy");
|
356 |
jpanel1.add(lblWorkspace,cc.xy(1,1)); |
357 |
|
358 |
addFillComponents(jpanel1,new int[]{ 2,4,6 },new int[]{ 2 }); |
359 |
return jpanel1;
|
360 |
} |
361 |
|
362 |
public JPanel createPanel6() |
363 |
{ |
364 |
JPanel jpanel1 = new JPanel(); |
365 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE","CENTER:MIN(16PX;DEFAULT):NONE,CENTER:MIN(16PX;DEFAULT):NONE,CENTER:MIN(16PX;DEFAULT):NONE"); |
366 |
CellConstraints cc = new CellConstraints();
|
367 |
jpanel1.setLayout(formlayout1); |
368 |
|
369 |
lblStatusTitle.setName("lblStatusTitle");
|
370 |
jpanel1.add(lblStatusTitle,cc.xy(1,1)); |
371 |
|
372 |
pbStatus.setName("pbStatus");
|
373 |
pbStatus.setValue(25);
|
374 |
jpanel1.add(pbStatus,cc.xy(1,2)); |
375 |
|
376 |
lblStatusMessages.setName("lblStatusMessages");
|
377 |
jpanel1.add(lblStatusMessages,cc.xy(1,3)); |
378 |
|
379 |
JLabel jlabel1 = new JLabel(); |
380 |
jlabel1.setText(" ");
|
381 |
jpanel1.add(jlabel1,cc.xy(2,1)); |
382 |
|
383 |
JLabel jlabel2 = new JLabel(); |
384 |
jlabel2.setText(" ");
|
385 |
jpanel1.add(jlabel2,cc.xy(2,2)); |
386 |
|
387 |
JLabel jlabel3 = new JLabel(); |
388 |
jlabel3.setText(" ");
|
389 |
jpanel1.add(jlabel3,cc.xy(2,3)); |
390 |
|
391 |
addFillComponents(jpanel1,new int[0],new int[0]); |
392 |
return jpanel1;
|
393 |
} |
394 |
|
395 |
public JPanel createPanel7() |
396 |
{ |
397 |
JPanel jpanel1 = new JPanel(); |
398 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE"); |
399 |
CellConstraints cc = new CellConstraints();
|
400 |
jpanel1.setLayout(formlayout1); |
401 |
|
402 |
btnAdvancedProperties.setActionCommand("_Advanced_properties");
|
403 |
btnAdvancedProperties.setName("btnAdvancedProperties");
|
404 |
btnAdvancedProperties.setText("_Advanced_properties");
|
405 |
jpanel1.add(btnAdvancedProperties,cc.xy(5,2)); |
406 |
|
407 |
jpanel1.add(createPanel8(),cc.xywh(1,1,5,1)); |
408 |
lblReadOnlyNotification.setName("lblReadOnlyNotification");
|
409 |
jpanel1.add(lblReadOnlyNotification,cc.xywh(1,2,2,1)); |
410 |
|
411 |
btnConnectToModel.setActionCommand("...");
|
412 |
btnConnectToModel.setIcon(loadImage("src/main/resources/org/gvsig/vcsgis/swing/impl/images/vcsgis-common-checkout-datamodel.png"));
|
413 |
btnConnectToModel.setName("btnConnectToModel");
|
414 |
btnConnectToModel.setToolTipText("_VCS_Connect_to_datamodel");
|
415 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
416 |
btnConnectToModel.setBorder(emptyborder1); |
417 |
jpanel1.add(btnConnectToModel,cc.xy(3,2)); |
418 |
|
419 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1 }); |
420 |
return jpanel1;
|
421 |
} |
422 |
|
423 |
public JPanel createPanel8() |
424 |
{ |
425 |
JPanel jpanel1 = new JPanel(); |
426 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE"); |
427 |
CellConstraints cc = new CellConstraints();
|
428 |
jpanel1.setLayout(formlayout1); |
429 |
|
430 |
chkMaintainStructureInToC.setActionCommand("_Maintain_structure_in_ToC");
|
431 |
chkMaintainStructureInToC.setName("chkMaintainStructureInToC");
|
432 |
chkMaintainStructureInToC.setText("_Maintain_structure_in_ToC");
|
433 |
jpanel1.add(chkMaintainStructureInToC,cc.xy(1,1)); |
434 |
|
435 |
chkCheckScale.setActionCommand("_Check_scale");
|
436 |
chkCheckScale.setName("chkCheckScale");
|
437 |
chkCheckScale.setText("_Check_scale");
|
438 |
jpanel1.add(chkCheckScale,cc.xy(3,1)); |
439 |
|
440 |
chkAddToCWhenLoadingAll.setActionCommand("_Add_to_ToC_when_loading_all ");
|
441 |
chkAddToCWhenLoadingAll.setName("chkAddToCWhenLoadingAll");
|
442 |
chkAddToCWhenLoadingAll.setText("_Add_to_ToC_when_loading_all");
|
443 |
jpanel1.add(chkAddToCWhenLoadingAll,cc.xy(5,1)); |
444 |
|
445 |
addFillComponents(jpanel1,new int[]{ 2,4,6 },new int[0]); |
446 |
return jpanel1;
|
447 |
} |
448 |
|
449 |
public JPanel createPanel9() |
450 |
{ |
451 |
JPanel jpanel1 = new JPanel(); |
452 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
453 |
CellConstraints cc = new CellConstraints();
|
454 |
jpanel1.setLayout(formlayout1); |
455 |
|
456 |
jpanel1.add(createPanel10(),cc.xy(2,2)); |
457 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 }); |
458 |
return jpanel1;
|
459 |
} |
460 |
|
461 |
public JPanel createPanel10() |
462 |
{ |
463 |
JPanel jpanel1 = new JPanel(); |
464 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU: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,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
465 |
CellConstraints cc = new CellConstraints();
|
466 |
jpanel1.setLayout(formlayout1); |
467 |
|
468 |
lblName.setName("lblName");
|
469 |
lblName.setText("_Name");
|
470 |
jpanel1.add(lblName,cc.xy(1,2)); |
471 |
|
472 |
txtName.setName("txtName");
|
473 |
jpanel1.add(txtName,cc.xy(3,2)); |
474 |
|
475 |
lblIdField.setName("lblIdField");
|
476 |
lblIdField.setText("_Id_field");
|
477 |
jpanel1.add(lblIdField,cc.xy(1,4)); |
478 |
|
479 |
cboIdField.setName("cboIdField");
|
480 |
jpanel1.add(cboIdField,cc.xy(3,4)); |
481 |
|
482 |
lblGeometryField.setName("lblGeometryField");
|
483 |
lblGeometryField.setText("_Geo_field");
|
484 |
jpanel1.add(lblGeometryField,cc.xy(1,6)); |
485 |
|
486 |
cboGeometryField.setName("cboGeometryField");
|
487 |
jpanel1.add(cboGeometryField,cc.xy(3,6)); |
488 |
|
489 |
lblProjection.setName("lblProjection");
|
490 |
lblProjection.setText("_Projection");
|
491 |
jpanel1.add(lblProjection,cc.xy(1,8)); |
492 |
|
493 |
jpanel1.add(createPanel11(),cc.xy(3,8)); |
494 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,3,5,7,9 }); |
495 |
return jpanel1;
|
496 |
} |
497 |
|
498 |
public JPanel createPanel11() |
499 |
{ |
500 |
JPanel jpanel1 = new JPanel(); |
501 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE","FILL:DEFAULT:NONE"); |
502 |
CellConstraints cc = new CellConstraints();
|
503 |
jpanel1.setLayout(formlayout1); |
504 |
|
505 |
txtProjection.setName("txtProjection");
|
506 |
jpanel1.add(txtProjection,cc.xy(1,1)); |
507 |
|
508 |
btnProjection.setActionCommand("...");
|
509 |
btnProjection.setName("btnProjection");
|
510 |
btnProjection.setText("...");
|
511 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
512 |
btnProjection.setBorder(emptyborder1); |
513 |
jpanel1.add(btnProjection,cc.xy(3,1)); |
514 |
|
515 |
btnChangeViewProjection.setActionCommand("...");
|
516 |
btnChangeViewProjection.setIcon(loadImage("datos/devel/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.geodb.app/org.gvsig.geodb.app.mainplugin/src/main/resources-plugin/images/geodb/geodb-crstoview.png"));
|
517 |
btnChangeViewProjection.setName("btnChangeViewProjection");
|
518 |
btnChangeViewProjection.setOpaque(false);
|
519 |
btnChangeViewProjection.setToolTipText("_Change_view_projection_to_this_projection");
|
520 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
521 |
btnChangeViewProjection.setBorder(emptyborder2); |
522 |
jpanel1.add(btnChangeViewProjection,cc.xy(5,1)); |
523 |
|
524 |
addFillComponents(jpanel1,new int[]{ 2,4 },new int[0]); |
525 |
return jpanel1;
|
526 |
} |
527 |
|
528 |
public JPanel createPanel12() |
529 |
{ |
530 |
JPanel jpanel1 = new JPanel(); |
531 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
532 |
CellConstraints cc = new CellConstraints();
|
533 |
jpanel1.setLayout(formlayout1); |
534 |
|
535 |
jpanel1.add(createPanel13(),cc.xy(2,2)); |
536 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 }); |
537 |
return jpanel1;
|
538 |
} |
539 |
|
540 |
public JPanel createPanel13() |
541 |
{ |
542 |
JPanel jpanel1 = new JPanel(); |
543 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
544 |
CellConstraints cc = new CellConstraints();
|
545 |
jpanel1.setLayout(formlayout1); |
546 |
|
547 |
lblFilter.setName("lblFilter");
|
548 |
lblFilter.setText("_Filter");
|
549 |
jpanel1.add(lblFilter,cc.xy(1,2)); |
550 |
|
551 |
jpanel1.add(createPanel14(),cc.xy(3,2)); |
552 |
lblVisible.setName("lblVisible");
|
553 |
lblVisible.setText("_Visible");
|
554 |
jpanel1.add(lblVisible,cc.xy(1,4)); |
555 |
|
556 |
chkVisible.setName("chkVisible");
|
557 |
jpanel1.add(chkVisible,cc.xy(3,4)); |
558 |
|
559 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,3 }); |
560 |
return jpanel1;
|
561 |
} |
562 |
|
563 |
public JPanel createPanel14() |
564 |
{ |
565 |
JPanel jpanel1 = new JPanel(); |
566 |
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"); |
567 |
CellConstraints cc = new CellConstraints();
|
568 |
jpanel1.setLayout(formlayout1); |
569 |
|
570 |
txtFilter.setName("txtFilter");
|
571 |
jpanel1.add(txtFilter,cc.xy(1,1)); |
572 |
|
573 |
btnFilter.setActionCommand("...");
|
574 |
btnFilter.setName("btnFilter");
|
575 |
btnFilter.setText("...");
|
576 |
EmptyBorder emptyborder1 = new EmptyBorder(2,2,2,2); |
577 |
btnFilter.setBorder(emptyborder1); |
578 |
jpanel1.add(btnFilter,cc.xy(3,1)); |
579 |
|
580 |
btnFilterBookmarks.setActionCommand("...");
|
581 |
btnFilterBookmarks.setName("btnFilterBookmarks");
|
582 |
btnFilterBookmarks.setText("...");
|
583 |
EmptyBorder emptyborder2 = new EmptyBorder(2,2,2,2); |
584 |
btnFilterBookmarks.setBorder(emptyborder2); |
585 |
jpanel1.add(btnFilterBookmarks,cc.xy(7,1)); |
586 |
|
587 |
btnFilterHistory.setActionCommand("...");
|
588 |
btnFilterHistory.setName("btnFilterHistory");
|
589 |
btnFilterHistory.setText("...");
|
590 |
EmptyBorder emptyborder3 = new EmptyBorder(2,2,2,2); |
591 |
btnFilterHistory.setBorder(emptyborder3); |
592 |
jpanel1.add(btnFilterHistory,cc.xy(5,1)); |
593 |
|
594 |
addFillComponents(jpanel1,new int[]{ 2,4,6 },new int[0]); |
595 |
return jpanel1;
|
596 |
} |
597 |
|
598 |
/**
|
599 |
* Initializer
|
600 |
*/
|
601 |
protected void initializePanel() |
602 |
{ |
603 |
setLayout(new BorderLayout()); |
604 |
add(createPanel(), BorderLayout.CENTER);
|
605 |
} |
606 |
|
607 |
|
608 |
} |