Revision 7344
trunk/extensions/extPublish/src/com/iver/cit/gvsig/publish/servers/mapserver/ServiceWMSPanel2.java | ||
---|---|---|
1 |
package com.iver.cit.gvsig.publish.servers.mapserver; |
|
2 |
|
|
3 |
import java.awt.Dimension; |
|
4 |
import java.awt.FlowLayout; |
|
5 |
import java.awt.GridBagConstraints; |
|
6 |
import java.awt.GridBagLayout; |
|
7 |
|
|
8 |
import javax.swing.JLabel; |
|
9 |
import javax.swing.JPanel; |
|
10 |
import javax.swing.JTextField; |
|
11 |
|
|
12 |
import org.gvsig.gui.beans.swing.GridBagLayoutPanel; |
|
13 |
|
|
14 |
import com.iver.andami.PluginServices; |
|
15 |
|
|
16 |
/* Intento de porte de ServiceWMSPanel a extension de GridBagLayoutPanel |
|
17 |
* |
|
18 |
* DGG |
|
19 |
*/ |
|
20 |
|
|
21 |
public class ServiceWMSPanel2 extends GridBagLayoutPanel{ |
|
22 |
|
|
23 |
private static final int tbWIDTH = 365; |
|
24 |
private static final int tbHEIGHT = 20; |
|
25 |
private static final int lbWIDTH = 125; |
|
26 |
private static final int lbHEIGHT = 20; |
|
27 |
|
|
28 |
private JPanel labelsPanel = null; |
|
29 |
private JPanel textsPanel = null; |
|
30 |
private JPanel mapFileLabelPanel = null; |
|
31 |
private JPanel symbolsLabelPanel = null; |
|
32 |
private JPanel fontsLabelPanel = null; |
|
33 |
private JPanel imageURLLabelPanel = null; |
|
34 |
private JPanel imagePathLabelPanel = null; |
|
35 |
private JPanel mapFileTextPanel = null; |
|
36 |
private JPanel symbolsTextPanel = null; |
|
37 |
private JPanel fontsTextPanel = null; |
|
38 |
private JPanel imageURLTextPanel = null; |
|
39 |
private JPanel imagePathTextPanel = null; |
|
40 |
private JLabel lbMapFile = null; |
|
41 |
private JLabel lbSymbols = null; |
|
42 |
private JLabel lbFonts = null; |
|
43 |
private JLabel lbImageURL = null; |
|
44 |
private JLabel lbImagePath = null; |
|
45 |
private JTextField tbMapFile = null; |
|
46 |
private JTextField tbSymbols = null; |
|
47 |
private JTextField tbFonts = null; |
|
48 |
private JTextField tbImageURL = null; |
|
49 |
private JTextField tbImagePath = null; |
|
50 |
|
|
51 |
ServiceWMSPanel2(){ |
|
52 |
super(); |
|
53 |
addComponent("labelsPanel",labelsPanel = new JPanel()); |
|
54 |
addComponent("textsPanel",textsPanel = new JPanel()); |
|
55 |
addComponent("mapFileLabelPanel",mapFileLabelPanel = new JPanel()); |
|
56 |
addComponent("symbolsLabelPanel",symbolsLabelPanel = new JPanel()); |
|
57 |
addComponent("fontslabelsPanel",fontsLabelPanel = new JPanel()); |
|
58 |
addComponent("imageURLLabelPnel",imageURLLabelPanel = new JPanel()); |
|
59 |
addComponent("imagePathLabelPanel",imagePathLabelPanel = new JPanel()); |
|
60 |
addComponent("mapFileTextPanel",mapFileTextPanel = new JPanel()); |
|
61 |
addComponent("symbolsTextPanel",symbolsTextPanel = new JPanel()); |
|
62 |
addComponent("fontsTextPanel",fontsTextPanel = new JPanel()); |
|
63 |
addComponent("imageURLTextPanel",imageURLTextPanel = new JPanel()); |
|
64 |
addComponent("imagePathTextPanel",imagePathTextPanel = new JPanel()); |
|
65 |
addComponent("lbMapFile",lbMapFile = new JLabel()); |
|
66 |
addComponent("lbSymbols",lbSymbols = new JLabel()); |
|
67 |
addComponent("lbFonts",lbFonts = new JLabel()); |
|
68 |
addComponent("lbImageURL",lbImageURL = new JLabel()); |
|
69 |
addComponent("lbImagePath",lbImagePath = new JLabel()); |
|
70 |
addComponent("tbMapFile",tbMapFile = new JTextField("",15)); |
|
71 |
addComponent("tbSymbols",tbSymbols = new JTextField("",15)); |
|
72 |
addComponent("tbFonts",tbFonts = new JTextField("",15)); |
|
73 |
addComponent("tbImageURL",tbImageURL = new JTextField("",15)); |
|
74 |
addComponent("tbImagePath",tbImagePath = new JTextField("",15)); |
|
75 |
initialize(); |
|
76 |
} |
|
77 |
|
|
78 |
|
|
79 |
private void initialize() { |
|
80 |
GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); |
|
81 |
gridBagConstraints1.gridy = 0; |
|
82 |
gridBagConstraints1.gridx = 1; |
|
83 |
GridBagConstraints gridBagConstraints = new GridBagConstraints(); |
|
84 |
gridBagConstraints.gridy = 0; |
|
85 |
gridBagConstraints.gridheight = 3; |
|
86 |
gridBagConstraints.gridx = 0; |
|
87 |
this.setLayout(new GridBagLayout()); |
|
88 |
this.setPreferredSize(new java.awt.Dimension(500,150)); |
|
89 |
this.add(getJPanel(), gridBagConstraints); |
|
90 |
this.add(getTextsPanel(), gridBagConstraints1); |
|
91 |
|
|
92 |
} |
|
93 |
|
|
94 |
/** |
|
95 |
* This method initializes jPanel |
|
96 |
* |
|
97 |
* @return javax.swing.JPanel |
|
98 |
*/ |
|
99 |
private JPanel getJPanel() { |
|
100 |
if (labelsPanel == null) { |
|
101 |
labelsPanel = new JPanel(); |
|
102 |
labelsPanel.setPreferredSize(new java.awt.Dimension(125,150)); |
|
103 |
labelsPanel.add(getMapFileLabelPanel(), null); |
|
104 |
labelsPanel.add(getSymbolsLabelPanel(), null); |
|
105 |
labelsPanel.add(getFontsLabelPanel(), null); |
|
106 |
labelsPanel.add(getImageURLLabelPanel(), null); |
|
107 |
labelsPanel.add(getImagePathLabelPanel(), null); |
|
108 |
} |
|
109 |
return labelsPanel; |
|
110 |
} |
|
111 |
|
|
112 |
/** |
|
113 |
* This method initializes textsPanel |
|
114 |
* |
|
115 |
* @return javax.swing.JPanel |
|
116 |
*/ |
|
117 |
private JPanel getTextsPanel() { |
|
118 |
if (textsPanel == null) { |
|
119 |
textsPanel = new JPanel(); |
|
120 |
textsPanel.setPreferredSize(new java.awt.Dimension(375,150)); |
|
121 |
textsPanel.add(getMapFileTextPanel(), null); |
|
122 |
textsPanel.add(getSymbolsTextPanel(), null); |
|
123 |
textsPanel.add(getFontsTextPanel(), null); |
|
124 |
textsPanel.add(getImageURLTextPanel(), null); |
|
125 |
textsPanel.add(getImagePathTextPanel(), null); |
|
126 |
} |
|
127 |
return textsPanel; |
|
128 |
} |
|
129 |
|
|
130 |
/** |
|
131 |
* This method initializes mapFileLabelPanel |
|
132 |
* |
|
133 |
* @return javax.swing.JPanel |
|
134 |
*/ |
|
135 |
private JPanel getMapFileLabelPanel() { |
|
136 |
if (mapFileLabelPanel == null) { |
|
137 |
FlowLayout flowLayout = new FlowLayout(); |
|
138 |
flowLayout.setAlignment(java.awt.FlowLayout.LEFT); |
|
139 |
lbMapFile = new JLabel(); |
|
140 |
lbMapFile.setText(PluginServices.getText(this, "mapFile")); |
|
141 |
mapFileLabelPanel = new JPanel(); |
|
142 |
mapFileLabelPanel.setLayout(flowLayout); |
|
143 |
mapFileLabelPanel.setPreferredSize(new Dimension(lbWIDTH,lbHEIGHT + 5)); |
|
144 |
mapFileLabelPanel.add(lbMapFile, null); |
|
145 |
} |
|
146 |
return mapFileLabelPanel; |
|
147 |
} |
|
148 |
|
|
149 |
/** |
|
150 |
* This method initializes symbolsLabelPanel |
|
151 |
* |
|
152 |
* @return javax.swing.JPanel |
|
153 |
*/ |
|
154 |
private JPanel getSymbolsLabelPanel() { |
|
155 |
if (symbolsLabelPanel == null) { |
|
156 |
FlowLayout flowLayout1 = new FlowLayout(); |
|
157 |
flowLayout1.setAlignment(java.awt.FlowLayout.LEFT); |
|
158 |
lbSymbols = new JLabel(); |
|
159 |
lbSymbols.setText(PluginServices.getText(this, "symbols")); |
|
160 |
symbolsLabelPanel = new JPanel(); |
|
161 |
symbolsLabelPanel.setLayout(flowLayout1); |
|
162 |
symbolsLabelPanel.setPreferredSize(new Dimension(lbWIDTH,lbHEIGHT + 5)); |
|
163 |
symbolsLabelPanel.add(lbSymbols, null); |
|
164 |
} |
|
165 |
return symbolsLabelPanel; |
|
166 |
} |
|
167 |
|
|
168 |
/** |
|
169 |
* This method initializes fontsLabelPanel |
|
170 |
* |
|
171 |
* @return javax.swing.JPanel |
|
172 |
*/ |
|
173 |
private JPanel getFontsLabelPanel() { |
|
174 |
if (fontsLabelPanel == null) { |
|
175 |
FlowLayout flowLayout2 = new FlowLayout(); |
|
176 |
flowLayout2.setAlignment(java.awt.FlowLayout.LEFT); |
|
177 |
lbFonts = new JLabel(); |
|
178 |
lbFonts.setText(PluginServices.getText(this, "fonts")); |
|
179 |
fontsLabelPanel = new JPanel(); |
|
180 |
fontsLabelPanel.setLayout(flowLayout2); |
|
181 |
fontsLabelPanel.setPreferredSize(new Dimension(lbWIDTH,lbHEIGHT + 5)); |
|
182 |
fontsLabelPanel.add(lbFonts, null); |
|
183 |
} |
|
184 |
return fontsLabelPanel; |
|
185 |
} |
|
186 |
|
|
187 |
/** |
|
188 |
* This method initializes shapePathLabelPanel |
|
189 |
* |
|
190 |
* @return javax.swing.JPanel |
|
191 |
*/ |
|
192 |
private JPanel getImageURLLabelPanel() { |
|
193 |
if (imageURLLabelPanel == null) { |
|
194 |
FlowLayout flowLayout3 = new FlowLayout(); |
|
195 |
flowLayout3.setAlignment(java.awt.FlowLayout.LEFT); |
|
196 |
lbImageURL = new JLabel(); |
|
197 |
lbImageURL.setText(PluginServices.getText(this, "imageURL")); |
|
198 |
imageURLLabelPanel = new JPanel(); |
|
199 |
imageURLLabelPanel.setLayout(flowLayout3); |
|
200 |
imageURLLabelPanel.setPreferredSize(new Dimension(lbWIDTH,lbHEIGHT + 5)); |
|
201 |
imageURLLabelPanel.add(lbImageURL, null); |
|
202 |
} |
|
203 |
return imageURLLabelPanel; |
|
204 |
} |
|
205 |
|
|
206 |
/** |
|
207 |
* This method initializes onlineResourceLabelPanel |
|
208 |
* |
|
209 |
* @return javax.swing.JPanel |
|
210 |
*/ |
|
211 |
private JPanel getImagePathLabelPanel() { |
|
212 |
if (imagePathLabelPanel == null) { |
|
213 |
FlowLayout flowLayout4 = new FlowLayout(); |
|
214 |
flowLayout4.setAlignment(java.awt.FlowLayout.LEFT); |
|
215 |
lbImagePath = new JLabel(); |
|
216 |
lbImagePath.setText(PluginServices.getText(this, "imagePath")); |
|
217 |
imagePathLabelPanel = new JPanel(); |
|
218 |
imagePathLabelPanel.setLayout(flowLayout4); |
|
219 |
imagePathLabelPanel.setPreferredSize(new Dimension(lbWIDTH,lbHEIGHT + 5)); |
|
220 |
imagePathLabelPanel.add(lbImagePath, null); |
|
221 |
} |
|
222 |
return imagePathLabelPanel; |
|
223 |
} |
|
224 |
|
|
225 |
/** |
|
226 |
* This method initializes mapFileTextPanel |
|
227 |
* |
|
228 |
* @return javax.swing.JPanel |
|
229 |
*/ |
|
230 |
private JPanel getMapFileTextPanel() { |
|
231 |
if (mapFileTextPanel == null) { |
|
232 |
mapFileTextPanel = new JPanel(); |
|
233 |
mapFileTextPanel.setPreferredSize(new Dimension(tbWIDTH,tbHEIGHT + 5)); |
|
234 |
mapFileTextPanel.add(getTbMapFile(), null); |
|
235 |
} |
|
236 |
return mapFileTextPanel; |
|
237 |
} |
|
238 |
|
|
239 |
/** |
|
240 |
* This method initializes symbolsTextPanel |
|
241 |
* |
|
242 |
* @return javax.swing.JPanel |
|
243 |
*/ |
|
244 |
private JPanel getSymbolsTextPanel() { |
|
245 |
if (symbolsTextPanel == null) { |
|
246 |
symbolsTextPanel = new JPanel(); |
|
247 |
symbolsTextPanel.setPreferredSize(new Dimension(tbWIDTH,tbHEIGHT + 5)); |
|
248 |
symbolsTextPanel.add(getTbSymbols(), null); |
|
249 |
} |
|
250 |
return symbolsTextPanel; |
|
251 |
} |
|
252 |
|
|
253 |
/** |
|
254 |
* This method initializes fontsTextPanel |
|
255 |
* |
|
256 |
* @return javax.swing.JPanel |
|
257 |
*/ |
|
258 |
private JPanel getFontsTextPanel() { |
|
259 |
if (fontsTextPanel == null) { |
|
260 |
fontsTextPanel = new JPanel(); |
|
261 |
fontsTextPanel.setPreferredSize(new Dimension(tbWIDTH,tbHEIGHT + 5)); |
|
262 |
fontsTextPanel.add(getTbFonts(), null); |
|
263 |
} |
|
264 |
return fontsTextPanel; |
|
265 |
} |
|
266 |
|
|
267 |
/** |
|
268 |
* This method initializes shapePathTextPanel |
|
269 |
* |
|
270 |
* @return javax.swing.JPanel |
|
271 |
*/ |
|
272 |
private JPanel getImageURLTextPanel() { |
|
273 |
if (imageURLTextPanel == null) { |
|
274 |
imageURLTextPanel = new JPanel(); |
|
275 |
imageURLTextPanel.setPreferredSize(new Dimension(tbWIDTH,tbHEIGHT + 5)); |
|
276 |
imageURLTextPanel.add(getTbImageURL(), null); |
|
277 |
} |
|
278 |
return imageURLTextPanel; |
|
279 |
} |
|
280 |
|
|
281 |
/** |
|
282 |
* This method initializes onlineResourceTextPanel |
|
283 |
* |
|
284 |
* @return javax.swing.JPanel |
|
285 |
*/ |
|
286 |
private JPanel getImagePathTextPanel() { |
|
287 |
if (imagePathTextPanel == null) { |
|
288 |
imagePathTextPanel = new JPanel(); |
|
289 |
imagePathTextPanel.setPreferredSize(new Dimension(tbWIDTH,tbHEIGHT + 5)); |
|
290 |
imagePathTextPanel.add(getTbImagePath(), null); |
|
291 |
} |
|
292 |
return imagePathTextPanel; |
|
293 |
} |
|
294 |
|
|
295 |
/** |
|
296 |
* This method initializes tbMapFile |
|
297 |
* |
|
298 |
* @return javax.swing.JTextField |
|
299 |
*/ |
|
300 |
private JTextField getTbMapFile() { |
|
301 |
if (tbMapFile == null) { |
|
302 |
tbMapFile = new JTextField(); |
|
303 |
tbMapFile.setPreferredSize(new Dimension(tbWIDTH,tbHEIGHT)); |
|
304 |
} |
|
305 |
return tbMapFile; |
|
306 |
} |
|
307 |
|
|
308 |
/** |
|
309 |
* This method initializes tbSymbols |
|
310 |
* |
|
311 |
* @return javax.swing.JTextField |
|
312 |
*/ |
|
313 |
private JTextField getTbSymbols() { |
|
314 |
if (tbSymbols == null) { |
|
315 |
tbSymbols = new JTextField(); |
|
316 |
tbSymbols.setPreferredSize(new Dimension(tbWIDTH,tbHEIGHT)); |
|
317 |
} |
|
318 |
return tbSymbols; |
|
319 |
} |
|
320 |
|
|
321 |
/** |
|
322 |
* This method initializes tbFonts |
|
323 |
* |
|
324 |
* @return javax.swing.JTextField |
|
325 |
*/ |
|
326 |
private JTextField getTbFonts() { |
|
327 |
if (tbFonts == null) { |
|
328 |
tbFonts = new JTextField(); |
|
329 |
tbFonts.setPreferredSize(new Dimension(tbWIDTH,tbHEIGHT)); |
|
330 |
} |
|
331 |
return tbFonts; |
|
332 |
} |
|
333 |
|
|
334 |
/** |
|
335 |
* This method initializes tbShapePath |
|
336 |
* |
|
337 |
* @return javax.swing.JTextField |
|
338 |
*/ |
|
339 |
private JTextField getTbImageURL() { |
|
340 |
if (tbImageURL == null) { |
|
341 |
tbImageURL = new JTextField(); |
|
342 |
tbImageURL.setPreferredSize(new Dimension(tbWIDTH,tbHEIGHT)); |
|
343 |
} |
|
344 |
return tbImageURL; |
|
345 |
} |
|
346 |
|
|
347 |
/** |
|
348 |
* This method initializes tbOnlineResource |
|
349 |
* |
|
350 |
* @return javax.swing.JTextField |
|
351 |
*/ |
|
352 |
private JTextField getTbImagePath() { |
|
353 |
if (tbImagePath == null) { |
|
354 |
tbImagePath = new JTextField(); |
|
355 |
tbImagePath.setPreferredSize(new Dimension(tbWIDTH,tbHEIGHT)); |
|
356 |
} |
|
357 |
return tbImagePath; |
|
358 |
} |
|
359 |
|
|
360 |
|
|
361 |
} |
|
0 | 362 |
Also available in: Unified diff