Revision 9227
branches/v10/extensions/extWFS2/src/com/iver/cit/gvsig/gui/wizards/WFSWizard.java | ||
---|---|---|
1 | 1 |
package com.iver.cit.gvsig.gui.wizards; |
2 | 2 |
|
3 |
import java.awt.Component; |
|
4 | 3 |
import java.awt.FlowLayout; |
4 |
import java.awt.event.ComponentAdapter; |
|
5 |
import java.awt.event.ComponentEvent; |
|
6 |
import java.awt.event.KeyAdapter; |
|
7 |
import java.awt.event.KeyEvent; |
|
5 | 8 |
import java.awt.geom.Rectangle2D; |
6 | 9 |
import java.net.MalformedURLException; |
7 | 10 |
import java.net.URL; |
... | ... | |
11 | 14 |
import org.gvsig.gui.beans.swing.JButton; |
12 | 15 |
import javax.swing.JCheckBox; |
13 | 16 |
import javax.swing.JLabel; |
14 |
import javax.swing.JOptionPane; |
|
15 | 17 |
import javax.swing.JPanel; |
16 | 18 |
|
17 |
import org.apache.log4j.Logger; |
|
18 |
import org.cresques.cts.IProjection; |
|
19 |
import org.cresques.cts.ProjectionPool; |
|
20 |
|
|
21 | 19 |
import com.iver.andami.PluginServices; |
22 | 20 |
import com.iver.andami.persistence.serverData.ServerDataPersistence; |
23 |
import com.iver.cit.gvsig.fmap.crs.CRSFactory; |
|
24 | 21 |
import com.iver.cit.gvsig.fmap.drivers.wfs.FMapWFSDriver; |
25 | 22 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
26 |
import com.iver.cit.gvsig.fmap.layers.FLyrWFS; |
|
27 | 23 |
import com.iver.cit.gvsig.fmap.layers.FLyrWFSFactory; |
28 | 24 |
import com.iver.cit.gvsig.gui.WizardPanel; |
29 | 25 |
import com.iver.cit.gvsig.gui.panels.WFSParamsPanel; |
30 |
import com.iver.cit.gvsig.project.documents.view.gui.View; |
|
31 | 26 |
import com.iver.utiles.NotExistInXMLEntity; |
32 | 27 |
import com.iver.utiles.XMLEntity; |
33 | 28 |
import com.iver.utiles.swing.jcomboServer.JComboServer; |
... | ... | |
77 | 72 |
* |
78 | 73 |
* $Id$ |
79 | 74 |
* $Log$ |
80 |
* Revision 1.14.2.5 2006-11-17 11:28:45 ppiqueras
|
|
81 |
* Corregidos bugs y añadida nueva funcionalidad.
|
|
75 |
* Revision 1.14.2.6 2006-12-11 09:52:32 ppiqueras
|
|
76 |
* Quitada la funcionalidad de que con la tecla "Enter" pueda "pulsar" los botones "Siguiente" o "Anterior" en WFS
|
|
82 | 77 |
* |
78 |
* Revision 1.20 2006/12/05 09:22:59 ppiqueras |
|
79 |
* Que con la tecla "Enter" permita hacer lo mismo que pulsando con el ratón sobre los botones "Conectar", "Siguiente" y "Anterior" en WFS. |
|
80 |
* |
|
83 | 81 |
* Revision 1.19 2006/10/31 09:38:15 jorpiell |
84 | 82 |
* Se ha creado una factoria para crear la capa. De ese modo no se repite c?digo desde le panel de propiedades y desde el panel de la capa |
85 | 83 |
* |
... | ... | |
321 | 319 |
} |
322 | 320 |
|
323 | 321 |
cmbHost.setServerList(servers); |
322 |
|
|
323 |
// Allows that user can start the connection to the written server pressing the 'Enter' key |
|
324 |
cmbHost.getEditor().getEditorComponent().addKeyListener(new KeyAdapter() { |
|
325 |
/* |
|
326 |
* (non-Javadoc) |
|
327 |
* @see java.awt.event.KeyAdapter#keyReleased(java.awt.event.KeyEvent) |
|
328 |
*/ |
|
329 |
public void keyReleased(KeyEvent e) { |
|
330 |
if (e.getKeyCode() == KeyEvent.VK_ENTER) { |
|
331 |
rellenarControles(); |
|
332 |
getBtnSiguiente().requestFocus(); // Sets focus to the 'next' button |
|
333 |
} |
|
334 |
} |
|
335 |
}); |
|
324 | 336 |
} |
325 | 337 |
return cmbHost; |
326 | 338 |
} |
... | ... | |
339 | 351 |
btnConnect.setText(PluginServices.getText(this, "connect")); |
340 | 352 |
btnConnect.addActionListener(new java.awt.event.ActionListener() { |
341 | 353 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
354 |
btnConnect.setEnabled(false); // This avoids multiple contiguous actions |
|
342 | 355 |
rellenarControles(); |
356 |
btnConnect.setEnabled(true); // This avoids multiple contiguous actions |
|
343 | 357 |
} |
344 | 358 |
}); |
359 |
|
|
360 |
// If user press the 'Enter' key -> advance |
|
361 |
btnConnect.addKeyListener(new KeyAdapter() { |
|
362 |
/* |
|
363 |
* (non-Javadoc) |
|
364 |
* @see java.awt.event.KeyListener#keyReleased(java.awt.event.KeyEvent) |
|
365 |
*/ |
|
366 |
public void keyReleased(KeyEvent e) { |
|
367 |
// TODO Auto-generated method stub |
|
368 |
if (e.getKeyCode() == KeyEvent.VK_ENTER) { |
|
369 |
btnConnect.doClick(); |
|
370 |
getBtnSiguiente().requestFocus(); |
|
371 |
} |
|
372 |
} |
|
373 |
}); |
|
345 | 374 |
} |
346 | 375 |
|
347 | 376 |
return btnConnect; |
... | ... | |
516 | 545 |
getPanelPage2().setVisible(true); |
517 | 546 |
activarVisualizarBotones(); |
518 | 547 |
} |
519 |
}); |
|
548 |
});
|
|
520 | 549 |
} |
521 | 550 |
return btnSiguiente; |
522 | 551 |
} |
... | ... | |
575 | 604 |
jPanel1.setBounds(2, 5, 477, 85); |
576 | 605 |
jPanel1.add(getTxtHost(), null); |
577 | 606 |
jPanel1.add(getBtnConnect(), null); |
578 |
jPanel1.add(getChkCaching(), null); |
|
607 |
jPanel1.add(getChkCaching(), null);
|
|
579 | 608 |
} |
580 | 609 |
|
581 | 610 |
return jPanel1; |
... | ... | |
691 | 720 |
}); |
692 | 721 |
chkCaching.addActionListener(new java.awt.event.ActionListener() { |
693 | 722 |
public void actionPerformed(java.awt.event.ActionEvent e) { |
723 |
chkCaching.setEnabled(false); // This avoids multiple contiguous actions |
|
694 | 724 |
fPrefs.putBoolean("refresh_capabilities", chkCaching.isSelected()); |
725 |
chkCaching.setEnabled(true); // This avoids multiple contiguous actions |
|
695 | 726 |
} |
696 | 727 |
}); |
697 | 728 |
|
Also available in: Unified diff