gvsig-raster / org.gvsig.raster / branches / org.gvsig.raster.2.4 / org.gvsig.wms / org.gvsig.wms.swing / org.gvsig.wms.swing.impl / src / main / java / org / gvsig / wms / swing / impl / DefaultWMSParametersPanelView.java @ 8692
History | View | Annotate | Download (24.7 KB)
1 |
package org.gvsig.wms.swing.impl; |
---|---|
2 |
|
3 |
import java.awt.BorderLayout; |
4 |
import java.awt.ComponentOrientation; |
5 |
import java.awt.Container; |
6 |
import java.awt.Dimension; |
7 |
|
8 |
import javax.swing.Box; |
9 |
import javax.swing.ButtonGroup; |
10 |
import javax.swing.ImageIcon; |
11 |
import javax.swing.JButton; |
12 |
import javax.swing.JCheckBox; |
13 |
import javax.swing.JComboBox; |
14 |
import javax.swing.JEditorPane; |
15 |
import javax.swing.JLabel; |
16 |
import javax.swing.JList; |
17 |
import javax.swing.JPanel; |
18 |
import javax.swing.JRadioButton; |
19 |
import javax.swing.JScrollPane; |
20 |
import javax.swing.JSlider; |
21 |
import javax.swing.JTabbedPane; |
22 |
import javax.swing.JTextField; |
23 |
import javax.swing.JTree; |
24 |
|
25 |
import com.jgoodies.forms.layout.CellConstraints; |
26 |
import com.jgoodies.forms.layout.FormLayout; |
27 |
|
28 |
|
29 |
public class DefaultWMSParametersPanelView extends JPanel |
30 |
{ |
31 |
JTabbedPane tabWMS = new JTabbedPane(); |
32 |
JLabel lblInformation = new JLabel(); |
33 |
JCheckBox chkAxisOrderXY = new JCheckBox(); |
34 |
JCheckBox chkLocalCache = new JCheckBox(); |
35 |
JButton btnConnect = new JButton(); |
36 |
JButton btnCancel = new JButton(); |
37 |
JComboBox cboServerList = new JComboBox(); |
38 |
JLabel lblServer = new JLabel(); |
39 |
JCheckBox chkRefreshCache = new JCheckBox(); |
40 |
JCheckBox chkRefreshLocalCache = new JCheckBox(); |
41 |
JEditorPane txtInformation = new JEditorPane(); |
42 |
JLabel lblUser = new JLabel(); |
43 |
JLabel lblPassword = new JLabel(); |
44 |
JTextField txtUser = new JTextField(); |
45 |
JTextField txtPassword = new JTextField(); |
46 |
JLabel lblLayerName = new JLabel(); |
47 |
JTextField txtLayerName = new JTextField(); |
48 |
JLabel lblSelectLayers = new JLabel(); |
49 |
JTree treeLayersSelector = new JTree(); |
50 |
JCheckBox chkMaintainLayersStruct = new JCheckBox(); |
51 |
JCheckBox chkShowLayerNames = new JCheckBox(); |
52 |
JButton btnAddLayer = new JButton(); |
53 |
JButton btnRemoveLayer = new JButton(); |
54 |
JButton btnUpLayer = new JButton(); |
55 |
JButton btnDownLayer = new JButton(); |
56 |
JList lstLayers = new JList(); |
57 |
JTree treeStyles = new JTree(); |
58 |
JLabel lblSettings = new JLabel(); |
59 |
JLabel lblSettingsEditor = new JLabel(); |
60 |
JLabel lblValue = new JLabel(); |
61 |
JSlider sldValues = new JSlider(); |
62 |
JButton btnFirst = new JButton(); |
63 |
JButton btnPrevious = new JButton(); |
64 |
JTextField txtDimensionNumber = new JTextField(); |
65 |
JButton btnNext = new JButton(); |
66 |
JButton btnLast = new JButton(); |
67 |
JRadioButton rdbSimpleValue = new JRadioButton(); |
68 |
ButtonGroup buttongroup1 = new ButtonGroup(); |
69 |
JRadioButton rdbMultipleValue = new JRadioButton(); |
70 |
JRadioButton rdbInterval = new JRadioButton(); |
71 |
JTextField txtSetting = new JTextField(); |
72 |
JButton btnSet = new JButton(); |
73 |
JLabel lblFieldValue = new JLabel(); |
74 |
JButton btnAddSetting = new JButton(); |
75 |
JButton btnClearSetting = new JButton(); |
76 |
JList lstDimensions = new JList(); |
77 |
JList lstDimensionsSettings = new JList(); |
78 |
JLabel lblFormats = new JLabel(); |
79 |
JCheckBox chkTransparency = new JCheckBox(); |
80 |
JLabel lblProjection = new JLabel(); |
81 |
JLabel lblInfoFormat = new JLabel(); |
82 |
JList lstInfoFormats = new JList(); |
83 |
JList lstProjections = new JList(); |
84 |
JList lstFormats = new JList(); |
85 |
|
86 |
/**
|
87 |
* Default constructor
|
88 |
*/
|
89 |
public DefaultWMSParametersPanelView()
|
90 |
{ |
91 |
initializePanel(); |
92 |
} |
93 |
|
94 |
/**
|
95 |
* Adds fill components to empty cells in the first row and first column of the grid.
|
96 |
* This ensures that the grid spacing will be the same as shown in the designer.
|
97 |
* @param cols an array of column indices in the first row where fill components should be added.
|
98 |
* @param rows an array of row indices in the first column where fill components should be added.
|
99 |
*/
|
100 |
void addFillComponents( Container panel, int[] cols, int[] rows ) |
101 |
{ |
102 |
Dimension filler = new Dimension(10,10); |
103 |
|
104 |
boolean filled_cell_11 = false; |
105 |
CellConstraints cc = new CellConstraints();
|
106 |
if ( cols.length > 0 && rows.length > 0 ) |
107 |
{ |
108 |
if ( cols[0] == 1 && rows[0] == 1 ) |
109 |
{ |
110 |
/** add a rigid area */
|
111 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,1) ); |
112 |
filled_cell_11 = true;
|
113 |
} |
114 |
} |
115 |
|
116 |
for( int index = 0; index < cols.length; index++ ) |
117 |
{ |
118 |
if ( cols[index] == 1 && filled_cell_11 ) |
119 |
{ |
120 |
continue;
|
121 |
} |
122 |
panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) ); |
123 |
} |
124 |
|
125 |
for( int index = 0; index < rows.length; index++ ) |
126 |
{ |
127 |
if ( rows[index] == 1 && filled_cell_11 ) |
128 |
{ |
129 |
continue;
|
130 |
} |
131 |
panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) ); |
132 |
} |
133 |
|
134 |
} |
135 |
|
136 |
/**
|
137 |
* Helper method to load an image file from the CLASSPATH
|
138 |
* @param imageName the package and name of the file to load relative to the CLASSPATH
|
139 |
* @return an ImageIcon instance with the specified image file
|
140 |
* @throws IllegalArgumentException if the image resource cannot be loaded.
|
141 |
*/
|
142 |
public ImageIcon loadImage( String imageName ) |
143 |
{ |
144 |
try
|
145 |
{ |
146 |
ClassLoader classloader = getClass().getClassLoader();
|
147 |
java.net.URL url = classloader.getResource( imageName ); |
148 |
if ( url != null ) |
149 |
{ |
150 |
ImageIcon icon = new ImageIcon( url ); |
151 |
return icon;
|
152 |
} |
153 |
} |
154 |
catch( Exception e ) |
155 |
{ |
156 |
e.printStackTrace(); |
157 |
} |
158 |
throw new IllegalArgumentException( "Unable to load image: " + imageName ); |
159 |
} |
160 |
|
161 |
/**
|
162 |
* Method for recalculating the component orientation for
|
163 |
* right-to-left Locales.
|
164 |
* @param orientation the component orientation to be applied
|
165 |
*/
|
166 |
public void applyComponentOrientation( ComponentOrientation orientation ) |
167 |
{ |
168 |
// Not yet implemented...
|
169 |
// I18NUtils.applyComponentOrientation(this, orientation);
|
170 |
super.applyComponentOrientation(orientation);
|
171 |
} |
172 |
|
173 |
public JPanel createPanel() |
174 |
{ |
175 |
JPanel jpanel1 = new JPanel(); |
176 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
177 |
CellConstraints cc = new CellConstraints();
|
178 |
jpanel1.setLayout(formlayout1); |
179 |
|
180 |
tabWMS.setName("tabWMS");
|
181 |
tabWMS.addTab("_connection",null,createPanel1()); |
182 |
tabWMS.addTab("_layers",null,createPanel3()); |
183 |
tabWMS.addTab("_styles",null,createPanel5()); |
184 |
tabWMS.addTab("_dimensions",null,createPanel6()); |
185 |
tabWMS.addTab("_formats",null,createPanel8()); |
186 |
jpanel1.add(tabWMS,new CellConstraints(2,2,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
187 |
|
188 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 }); |
189 |
return jpanel1;
|
190 |
} |
191 |
|
192 |
public JPanel createPanel1() |
193 |
{ |
194 |
JPanel jpanel1 = new JPanel(); |
195 |
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","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,CENTER: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,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
196 |
CellConstraints cc = new CellConstraints();
|
197 |
jpanel1.setLayout(formlayout1); |
198 |
|
199 |
lblInformation.setName("lblInformation");
|
200 |
lblInformation.setText("_information");
|
201 |
lblInformation.setToolTipText("_information");
|
202 |
jpanel1.add(lblInformation,cc.xywh(2,18,5,1)); |
203 |
|
204 |
chkAxisOrderXY.setActionCommand("_assumption_axis_order_xy");
|
205 |
chkAxisOrderXY.setName("chkAxisOrderXY");
|
206 |
chkAxisOrderXY.setText("_assumption_axis_order_xy");
|
207 |
chkAxisOrderXY.setToolTipText("_assumption_axis_order_xy");
|
208 |
jpanel1.add(chkAxisOrderXY,cc.xywh(2,16,5,1)); |
209 |
|
210 |
chkLocalCache.setActionCommand("JCheckBox");
|
211 |
chkLocalCache.setName("chkLocalCache");
|
212 |
chkLocalCache.setText("_use_local_tile_cache");
|
213 |
chkLocalCache.setToolTipText("_use_local_tile_cache");
|
214 |
jpanel1.add(chkLocalCache,cc.xywh(2,12,5,1)); |
215 |
|
216 |
btnConnect.setActionCommand("_connect");
|
217 |
btnConnect.setName("btnConnect");
|
218 |
btnConnect.setText("_connect");
|
219 |
btnConnect.setToolTipText("_try_connect_to_the_server");
|
220 |
jpanel1.add(btnConnect,cc.xy(4,10)); |
221 |
|
222 |
btnCancel.setActionCommand("_cancel");
|
223 |
btnCancel.setName("btnCancel");
|
224 |
btnCancel.setText("_cancel");
|
225 |
btnCancel.setToolTipText("_cancel_connection");
|
226 |
jpanel1.add(btnCancel,cc.xy(6,10)); |
227 |
|
228 |
cboServerList.setEditable(true);
|
229 |
cboServerList.setName("cboServerList");
|
230 |
cboServerList.setRequestFocusEnabled(false);
|
231 |
cboServerList.setToolTipText("_server_connection_string");
|
232 |
jpanel1.add(cboServerList,cc.xywh(2,4,5,1)); |
233 |
|
234 |
lblServer.setName("lblServer");
|
235 |
lblServer.setText("_server");
|
236 |
lblServer.setToolTipText("_server_conexion_string");
|
237 |
jpanel1.add(lblServer,cc.xywh(2,2,5,1)); |
238 |
|
239 |
chkRefreshCache.setActionCommand("JCheckBox");
|
240 |
chkRefreshCache.setName("chkRefreshCache");
|
241 |
chkRefreshCache.setText("_refresh_service_cache");
|
242 |
chkRefreshCache.setToolTipText("_refresh_service_cache");
|
243 |
jpanel1.add(chkRefreshCache,cc.xywh(2,8,5,1)); |
244 |
|
245 |
chkRefreshLocalCache.setActionCommand("JCheckBox");
|
246 |
chkRefreshLocalCache.setName("chkRefreshLocalCache");
|
247 |
chkRefreshLocalCache.setText("_refresh_local_tile_cache");
|
248 |
chkRefreshLocalCache.setToolTipText("_refresh_local_tile_cache");
|
249 |
jpanel1.add(chkRefreshLocalCache,cc.xywh(2,14,5,1)); |
250 |
|
251 |
txtInformation.setContentType("text/html");
|
252 |
txtInformation.setName("txtInformation");
|
253 |
txtInformation.setSelectionEnd(1);
|
254 |
txtInformation.setSelectionStart(1);
|
255 |
txtInformation.setText("<html>\n <head>\n \n </head>\n <body>\n </body>\n</html>\n");
|
256 |
JScrollPane jscrollpane1 = new JScrollPane(); |
257 |
jscrollpane1.setViewportView(txtInformation); |
258 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
259 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
260 |
jpanel1.add(jscrollpane1,new CellConstraints(2,20,5,1,CellConstraints.FILL,CellConstraints.FILL)); |
261 |
|
262 |
jpanel1.add(createPanel2(),cc.xywh(2,6,5,1)); |
263 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 }); |
264 |
return jpanel1;
|
265 |
} |
266 |
|
267 |
public JPanel createPanel2() |
268 |
{ |
269 |
JPanel jpanel1 = new JPanel(); |
270 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0)","CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE"); |
271 |
CellConstraints cc = new CellConstraints();
|
272 |
jpanel1.setLayout(formlayout1); |
273 |
|
274 |
lblUser.setName("lblUser");
|
275 |
lblUser.setText("_user");
|
276 |
lblUser.setToolTipText("_user");
|
277 |
jpanel1.add(lblUser,cc.xy(1,1)); |
278 |
|
279 |
lblPassword.setName("lblPassword");
|
280 |
lblPassword.setText("_password");
|
281 |
lblPassword.setToolTipText("_password");
|
282 |
jpanel1.add(lblPassword,cc.xy(1,3)); |
283 |
|
284 |
txtUser.setName("txtUser");
|
285 |
txtUser.setToolTipText("_user");
|
286 |
jpanel1.add(txtUser,cc.xy(3,1)); |
287 |
|
288 |
txtPassword.setName("txtPassword");
|
289 |
txtPassword.setToolTipText("_password");
|
290 |
jpanel1.add(txtPassword,cc.xy(3,3)); |
291 |
|
292 |
addFillComponents(jpanel1,new int[]{ 2 },new int[]{ 2 }); |
293 |
return jpanel1;
|
294 |
} |
295 |
|
296 |
public JPanel createPanel3() |
297 |
{ |
298 |
JPanel jpanel1 = new JPanel(); |
299 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE"); |
300 |
CellConstraints cc = new CellConstraints();
|
301 |
jpanel1.setLayout(formlayout1); |
302 |
|
303 |
lblLayerName.setName("lblLayerName");
|
304 |
lblLayerName.setText("_layer_name");
|
305 |
lblLayerName.setToolTipText("_layer_name_in_toc");
|
306 |
jpanel1.add(lblLayerName,cc.xy(2,2)); |
307 |
|
308 |
txtLayerName.setName("txtLayerName");
|
309 |
txtLayerName.setToolTipText("_layer_name_in_toc");
|
310 |
jpanel1.add(txtLayerName,cc.xy(2,4)); |
311 |
|
312 |
lblSelectLayers.setName("lblSelectLayers");
|
313 |
lblSelectLayers.setText("_select_layers");
|
314 |
lblSelectLayers.setToolTipText("_select_layers");
|
315 |
jpanel1.add(lblSelectLayers,cc.xy(2,6)); |
316 |
|
317 |
treeLayersSelector.setName("treeLayersSelector");
|
318 |
treeLayersSelector.setToolTipText("_select_layers");
|
319 |
JScrollPane jscrollpane1 = new JScrollPane(); |
320 |
jscrollpane1.setViewportView(treeLayersSelector); |
321 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
322 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
323 |
jpanel1.add(jscrollpane1,new CellConstraints(2,8,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
324 |
|
325 |
chkMaintainLayersStruct.setActionCommand("_maintain_layers_struct");
|
326 |
chkMaintainLayersStruct.setName("chkMaintainLayersStruct");
|
327 |
chkMaintainLayersStruct.setText("_maintain_layers_struct");
|
328 |
chkMaintainLayersStruct.setToolTipText("_maintain_layers_struct");
|
329 |
jpanel1.add(chkMaintainLayersStruct,cc.xy(2,12)); |
330 |
|
331 |
chkShowLayerNames.setActionCommand("_show_layer_names");
|
332 |
chkShowLayerNames.setName("chkShowLayerNames");
|
333 |
chkShowLayerNames.setText("_show_layer_names");
|
334 |
chkShowLayerNames.setToolTipText("_show_layer_names");
|
335 |
jpanel1.add(chkShowLayerNames,cc.xy(2,14)); |
336 |
|
337 |
jpanel1.add(createPanel4(),new CellConstraints(2,10,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
338 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }); |
339 |
return jpanel1;
|
340 |
} |
341 |
|
342 |
public JPanel createPanel4() |
343 |
{ |
344 |
JPanel jpanel1 = new JPanel(); |
345 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:NONE","CENTER:2DLU:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:GROW(1.0)"); |
346 |
CellConstraints cc = new CellConstraints();
|
347 |
jpanel1.setLayout(formlayout1); |
348 |
|
349 |
btnAddLayer.setActionCommand("JButton");
|
350 |
btnAddLayer.setName("btnAddLayer");
|
351 |
btnAddLayer.setText("_add_layer");
|
352 |
btnAddLayer.setToolTipText("_add_layer");
|
353 |
jpanel1.add(btnAddLayer,cc.xy(3,2)); |
354 |
|
355 |
btnRemoveLayer.setActionCommand("JButton");
|
356 |
btnRemoveLayer.setName("btnRemoveLayer");
|
357 |
btnRemoveLayer.setText("_remove_layer");
|
358 |
btnRemoveLayer.setToolTipText("_remove_layer");
|
359 |
jpanel1.add(btnRemoveLayer,cc.xy(3,4)); |
360 |
|
361 |
btnUpLayer.setActionCommand("_up_layer");
|
362 |
btnUpLayer.setName("btnUpLayer");
|
363 |
btnUpLayer.setText("_up_layer");
|
364 |
btnUpLayer.setToolTipText("_up_layer");
|
365 |
jpanel1.add(btnUpLayer,cc.xy(3,6)); |
366 |
|
367 |
btnDownLayer.setActionCommand("_down_layer");
|
368 |
btnDownLayer.setName("btnDownLayer");
|
369 |
btnDownLayer.setText("_down_layer");
|
370 |
btnDownLayer.setToolTipText("_down_layer");
|
371 |
jpanel1.add(btnDownLayer,cc.xy(3,8)); |
372 |
|
373 |
lstLayers.setName("lstLayers");
|
374 |
JScrollPane jscrollpane1 = new JScrollPane(); |
375 |
jscrollpane1.setViewportView(lstLayers); |
376 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
377 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
378 |
jpanel1.add(jscrollpane1,cc.xywh(1,1,1,9)); |
379 |
|
380 |
addFillComponents(jpanel1,new int[]{ 2,3 },new int[]{ 2,3,4,5,6,7,8,9 }); |
381 |
return jpanel1;
|
382 |
} |
383 |
|
384 |
public JPanel createPanel5() |
385 |
{ |
386 |
JPanel jpanel1 = new JPanel(); |
387 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
388 |
CellConstraints cc = new CellConstraints();
|
389 |
jpanel1.setLayout(formlayout1); |
390 |
|
391 |
treeStyles.setName("treeStyles");
|
392 |
JScrollPane jscrollpane1 = new JScrollPane(); |
393 |
jscrollpane1.setViewportView(treeStyles); |
394 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
395 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
396 |
jpanel1.add(jscrollpane1,new CellConstraints(2,2,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
397 |
|
398 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3 }); |
399 |
return jpanel1;
|
400 |
} |
401 |
|
402 |
public JPanel createPanel6() |
403 |
{ |
404 |
JPanel jpanel1 = new JPanel(); |
405 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),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,FILL:DEFAULT:NONE,CENTER:2DLU:NONE"); |
406 |
CellConstraints cc = new CellConstraints();
|
407 |
jpanel1.setLayout(formlayout1); |
408 |
|
409 |
lblSettings.setName("lblSettings");
|
410 |
lblSettings.setText("_settings");
|
411 |
lblSettings.setToolTipText("_settings");
|
412 |
jpanel1.add(lblSettings,cc.xy(2,2)); |
413 |
|
414 |
lblSettingsEditor.setName("lblSettingsEditor");
|
415 |
lblSettingsEditor.setText("_settings_editor");
|
416 |
lblSettingsEditor.setToolTipText("_settings_editor");
|
417 |
jpanel1.add(lblSettingsEditor,cc.xy(2,6)); |
418 |
|
419 |
jpanel1.add(createPanel7(),cc.xy(4,8)); |
420 |
lstDimensions.setName("lstDimensions");
|
421 |
JScrollPane jscrollpane1 = new JScrollPane(); |
422 |
jscrollpane1.setViewportView(lstDimensions); |
423 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
424 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
425 |
jpanel1.add(jscrollpane1,cc.xy(2,8)); |
426 |
|
427 |
lstDimensionsSettings.setName("lstDimensionsSettings");
|
428 |
JScrollPane jscrollpane2 = new JScrollPane(); |
429 |
jscrollpane2.setViewportView(lstDimensionsSettings); |
430 |
jscrollpane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
431 |
jscrollpane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
432 |
jpanel1.add(jscrollpane2,cc.xywh(2,4,3,1)); |
433 |
|
434 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
435 |
return jpanel1;
|
436 |
} |
437 |
|
438 |
public JPanel createPanel7() |
439 |
{ |
440 |
JPanel jpanel1 = new JPanel(); |
441 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE,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,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,CENTER:DEFAULT:NONE"); |
442 |
CellConstraints cc = new CellConstraints();
|
443 |
jpanel1.setLayout(formlayout1); |
444 |
|
445 |
lblValue.setName("lblValue");
|
446 |
lblValue.setText("_value");
|
447 |
lblValue.setToolTipText("_value");
|
448 |
jpanel1.add(lblValue,cc.xywh(1,1,3,1)); |
449 |
|
450 |
sldValues.setMajorTickSpacing(20);
|
451 |
sldValues.setName("sldValues");
|
452 |
sldValues.setPaintLabels(true);
|
453 |
sldValues.setPaintTicks(true);
|
454 |
jpanel1.add(sldValues,cc.xywh(1,3,11,1)); |
455 |
|
456 |
btnFirst.setActionCommand("_first");
|
457 |
btnFirst.setName("btnFirst");
|
458 |
btnFirst.setText("_first");
|
459 |
btnFirst.setToolTipText("_first");
|
460 |
jpanel1.add(btnFirst,cc.xy(1,5)); |
461 |
|
462 |
btnPrevious.setActionCommand("_previous");
|
463 |
btnPrevious.setName("btnPrevious");
|
464 |
btnPrevious.setText("_previous");
|
465 |
btnPrevious.setToolTipText("_previous");
|
466 |
jpanel1.add(btnPrevious,cc.xy(3,5)); |
467 |
|
468 |
txtDimensionNumber.setName("txtDimensionNumber");
|
469 |
jpanel1.add(txtDimensionNumber,cc.xywh(5,5,3,1)); |
470 |
|
471 |
btnNext.setActionCommand("_next");
|
472 |
btnNext.setName("btnNext");
|
473 |
btnNext.setText("_next");
|
474 |
btnNext.setToolTipText("_next");
|
475 |
jpanel1.add(btnNext,cc.xy(9,5)); |
476 |
|
477 |
btnLast.setActionCommand("_last");
|
478 |
btnLast.setName("btnLast");
|
479 |
btnLast.setText("_last");
|
480 |
btnLast.setToolTipText("_last");
|
481 |
jpanel1.add(btnLast,cc.xy(11,5)); |
482 |
|
483 |
rdbSimpleValue.setActionCommand("_simple_value");
|
484 |
rdbSimpleValue.setName("rdbSimpleValue");
|
485 |
rdbSimpleValue.setText("_simple_value");
|
486 |
rdbSimpleValue.setToolTipText("_simple_value");
|
487 |
buttongroup1.add(rdbSimpleValue); |
488 |
jpanel1.add(rdbSimpleValue,cc.xywh(1,7,11,1)); |
489 |
|
490 |
rdbMultipleValue.setActionCommand("_multiple_value");
|
491 |
rdbMultipleValue.setName("rdbMultipleValue");
|
492 |
rdbMultipleValue.setText("_multiple_value");
|
493 |
rdbMultipleValue.setToolTipText("_multiple_value");
|
494 |
buttongroup1.add(rdbMultipleValue); |
495 |
jpanel1.add(rdbMultipleValue,cc.xywh(1,9,11,1)); |
496 |
|
497 |
rdbInterval.setActionCommand("_interval");
|
498 |
rdbInterval.setName("rdbInterval");
|
499 |
rdbInterval.setText("_interval");
|
500 |
rdbInterval.setToolTipText("_interval");
|
501 |
buttongroup1.add(rdbInterval); |
502 |
jpanel1.add(rdbInterval,cc.xywh(1,11,11,1)); |
503 |
|
504 |
txtSetting.setName("txtSetting");
|
505 |
txtSetting.setToolTipText("_setting");
|
506 |
jpanel1.add(txtSetting,cc.xywh(1,15,11,1)); |
507 |
|
508 |
btnSet.setActionCommand("_set");
|
509 |
btnSet.setName("btnSet");
|
510 |
btnSet.setText("_set");
|
511 |
btnSet.setToolTipText("_set");
|
512 |
jpanel1.add(btnSet,cc.xywh(1,17,5,1)); |
513 |
|
514 |
lblFieldValue.setName("lblFieldValue");
|
515 |
lblFieldValue.setToolTipText("_value");
|
516 |
jpanel1.add(lblFieldValue,cc.xywh(5,1,7,1)); |
517 |
|
518 |
btnAddSetting.setActionCommand("_add");
|
519 |
btnAddSetting.setName("btnAddSetting");
|
520 |
btnAddSetting.setText("_add");
|
521 |
btnAddSetting.setToolTipText("_add_setting");
|
522 |
jpanel1.add(btnAddSetting,cc.xywh(1,13,5,1)); |
523 |
|
524 |
btnClearSetting.setActionCommand("_clear");
|
525 |
btnClearSetting.setName("btnClearSetting");
|
526 |
btnClearSetting.setText("_clear");
|
527 |
btnClearSetting.setToolTipText("_clear_setting");
|
528 |
jpanel1.add(btnClearSetting,cc.xywh(7,13,5,1)); |
529 |
|
530 |
addFillComponents(jpanel1,new int[]{ 2,3,4,6,7,8,9,10,11 },new int[]{ 2,4,6,8,10,12,14,16 }); |
531 |
return jpanel1;
|
532 |
} |
533 |
|
534 |
public JPanel createPanel8() |
535 |
{ |
536 |
JPanel jpanel1 = new JPanel(); |
537 |
FormLayout formlayout1 = new FormLayout("FILL:4DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:4DLU:NONE","CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:GROW(1.0),CENTER:2DLU:NONE"); |
538 |
CellConstraints cc = new CellConstraints();
|
539 |
jpanel1.setLayout(formlayout1); |
540 |
|
541 |
lblFormats.setName("lblFormats");
|
542 |
lblFormats.setText("_select_format");
|
543 |
lblFormats.setToolTipText("_select_format");
|
544 |
jpanel1.add(lblFormats,cc.xy(2,2)); |
545 |
|
546 |
chkTransparency.setActionCommand("_transparency");
|
547 |
chkTransparency.setName("chkTransparency");
|
548 |
chkTransparency.setText("_transparency");
|
549 |
chkTransparency.setToolTipText("_transparency");
|
550 |
jpanel1.add(chkTransparency,cc.xy(2,6)); |
551 |
|
552 |
lblProjection.setName("lblProjection");
|
553 |
lblProjection.setText("_select_crs");
|
554 |
lblProjection.setToolTipText("_select_crs");
|
555 |
jpanel1.add(lblProjection,cc.xy(2,8)); |
556 |
|
557 |
lblInfoFormat.setName("lblInfoFormat");
|
558 |
lblInfoFormat.setText("_select_info_format");
|
559 |
lblInfoFormat.setToolTipText("_select_info_format");
|
560 |
jpanel1.add(lblInfoFormat,cc.xy(2,12)); |
561 |
|
562 |
lstInfoFormats.setName("lstInfoFormats");
|
563 |
JScrollPane jscrollpane1 = new JScrollPane(); |
564 |
jscrollpane1.setViewportView(lstInfoFormats); |
565 |
jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
566 |
jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
567 |
jpanel1.add(jscrollpane1,new CellConstraints(2,14,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
568 |
|
569 |
lstProjections.setName("lstProjections");
|
570 |
JScrollPane jscrollpane2 = new JScrollPane(); |
571 |
jscrollpane2.setViewportView(lstProjections); |
572 |
jscrollpane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
573 |
jscrollpane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
574 |
jpanel1.add(jscrollpane2,new CellConstraints(2,10,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
575 |
|
576 |
lstFormats.setName("lstFormats");
|
577 |
JScrollPane jscrollpane3 = new JScrollPane(); |
578 |
jscrollpane3.setViewportView(lstFormats); |
579 |
jscrollpane3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
|
580 |
jscrollpane3.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
|
581 |
jpanel1.add(jscrollpane3,new CellConstraints(2,4,1,1,CellConstraints.FILL,CellConstraints.FILL)); |
582 |
|
583 |
addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 }); |
584 |
return jpanel1;
|
585 |
} |
586 |
|
587 |
/**
|
588 |
* Initializer
|
589 |
*/
|
590 |
protected void initializePanel() |
591 |
{ |
592 |
setLayout(new BorderLayout()); |
593 |
add(createPanel(), BorderLayout.CENTER);
|
594 |
} |
595 |
|
596 |
|
597 |
} |