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