Revision 3855 branches/v05/extensions/extWMS/src/com/iver/cit/gvsig/gui/dialogs/WMSPropsDialog.java
WMSPropsDialog.java | ||
---|---|---|
43 | 43 |
import java.awt.event.ActionEvent; |
44 | 44 |
import java.awt.event.ActionListener; |
45 | 45 |
import java.net.URL; |
46 |
import java.util.ArrayList; |
|
46 | 47 |
import java.util.HashMap; |
47 |
import java.util.Hashtable; |
|
48 | 48 |
import java.util.Vector; |
49 | 49 |
|
50 | 50 |
import javax.swing.JButton; |
... | ... | |
67 | 67 |
import com.iver.cit.gvsig.gui.wizards.WizardListenerSupport; |
68 | 68 |
|
69 | 69 |
/** |
70 |
* The TOC WMS properties container panel. |
|
71 |
* |
|
70 | 72 |
* @author jaume - jaume.dominguez@iver.es |
71 | 73 |
* |
72 | 74 |
*/ |
... | ... | |
95 | 97 |
|
96 | 98 |
setFLayer(layer); |
97 | 99 |
wmsParamsTabbedPane = getParamsPanel(((FLyrWMS) layer).getProperties()); |
98 |
// for (int i = 0; i < wmsParamsTabbedPane.getJTabbedPane().getComponentCount(); i++) { |
|
99 |
// wmsParamsTabbedPane.getJTabbedPane().getComponent(i).addMouseListener(new java.awt.event.MouseAdapter() { |
|
100 |
// public void mouseClicked(java.awt.event.MouseEvent e) { |
|
101 |
// //page = wmsParamsPanel.currentPage() + 1; |
|
102 |
// getBtnOk().setEnabled(wmsParamsTabbedPane.isCorretlyConfigured()); |
|
103 |
// } |
|
104 |
// }); |
|
105 |
// } |
|
106 | 100 |
wmsParamsTabbedPane.addWizardListener(new WizardListener(){ |
107 | 101 |
|
108 | 102 |
public void wizardStateChanged(boolean finishable) { |
... | ... | |
111 | 105 |
} |
112 | 106 |
|
113 | 107 |
public void error(Exception e) { |
114 |
// TODO Auto-generated method stub |
|
115 | 108 |
} |
116 | 109 |
|
117 | 110 |
}) ; |
... | ... | |
162 | 155 |
dataSource.setHost(host); |
163 | 156 |
|
164 | 157 |
WMSParamsPanel toc = new WMSParamsPanel(); |
158 |
toc.setLayerName((String)info.get("name")); |
|
165 | 159 |
toc.setWizardData(dataSource); |
166 | 160 |
//toc.setDataSource(dataSource); |
167 | 161 |
toc.setVisible(true); |
... | ... | |
178 | 172 |
} |
179 | 173 |
} |
180 | 174 |
if (any) { |
181 |
toc.refresh(); |
|
175 |
toc.refreshData();
|
|
182 | 176 |
} |
183 | 177 |
String srs = (String) info.get("srs"); |
184 | 178 |
String format = (String) info.get("format"); |
... | ... | |
194 | 188 |
Vector v = (Vector) info.get("styles"); |
195 | 189 |
|
196 | 190 |
if (v != null) |
197 |
toc.setStyleSelections(v); |
|
191 |
toc.setStyleSelections(selectedLayers, v);
|
|
198 | 192 |
v = (Vector) info.get("dimensions"); |
199 | 193 |
if (v != null) toc.setDimensions(v); |
200 | 194 |
|
201 |
// why refresh twice? |
|
202 | 195 |
toc.refreshInfo(); |
203 | 196 |
return toc; |
204 | 197 |
} catch (DriverException ioe){ |
... | ... | |
228 | 221 |
|
229 | 222 |
public JButton getBtnOk() { |
230 | 223 |
if (btnOk == null) { |
231 |
btnOk = new JButton("Aceptar");
|
|
232 |
btnOk.setText(PluginServices.getText(this,"Aceptar"));
|
|
224 |
btnOk = new JButton("aceptar");
|
|
225 |
btnOk.setText(PluginServices.getText(this,"aceptar"));
|
|
233 | 226 |
btnOk.setActionCommand("OK"); |
234 | 227 |
btnOk.addActionListener(m_actionListener); |
235 | 228 |
btnOk.setBounds(367, 9, 90, 25); |
... | ... | |
239 | 232 |
|
240 | 233 |
public JButton getBtnApply() { |
241 | 234 |
if (btnApply == null) { |
242 |
btnApply = new JButton("Aplicar");
|
|
243 |
btnApply.setText(PluginServices.getText(this,"Aplicar"));
|
|
235 |
btnApply = new JButton("apply");
|
|
236 |
btnApply.setText(PluginServices.getText(this,"aplicar"));
|
|
244 | 237 |
btnApply.setEnabled(false); |
245 | 238 |
btnApply.setActionCommand("APPLY"); |
246 | 239 |
btnApply.addActionListener(m_actionListener); |
... | ... | |
251 | 244 |
|
252 | 245 |
public JButton getBtnCancel() { |
253 | 246 |
if (btnCancel == null) { |
254 |
btnCancel = new JButton("Cancelar");
|
|
255 |
btnCancel.setText(PluginServices.getText(this,"Cancelar"));
|
|
247 |
btnCancel = new JButton("cancelar");
|
|
248 |
btnCancel.setText(PluginServices.getText(this,"cancelar"));
|
|
256 | 249 |
btnCancel.setActionCommand("CANCEL"); |
257 | 250 |
btnCancel.addActionListener(m_actionListener); |
258 | 251 |
btnCancel.setBounds(137, 9, 90, 25); |
... | ... | |
310 | 303 |
public ViewInfo getViewInfo() { |
311 | 304 |
if (m_ViewInfo==null){ |
312 | 305 |
m_ViewInfo=new ViewInfo(ViewInfo.MODALDIALOG); |
313 |
m_ViewInfo.setTitle(PluginServices.getText(this,"Ajustar_mapa_WMS"));
|
|
306 |
m_ViewInfo.setTitle(PluginServices.getText(this,"fit_WMS_layer"));
|
|
314 | 307 |
m_ViewInfo.setWidth(wmsParamsTabbedPane.getWidth()+10); |
315 | 308 |
m_ViewInfo.setHeight(wmsParamsTabbedPane.getHeight()+40); |
316 | 309 |
|
Also available in: Unified diff