Revision 9915 trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSAreaPanel.java

View differences:

WFSAreaPanel.java
6 6
import java.awt.Rectangle;
7 7
import java.awt.event.ActionEvent;
8 8
import java.awt.event.ActionListener;
9
import java.awt.event.FocusAdapter;
10
import java.awt.event.FocusEvent;
11
import java.awt.event.FocusListener;
12
import java.awt.event.KeyAdapter;
13
import java.awt.event.KeyEvent;
14
import java.awt.event.KeyListener;
9 15
import java.awt.geom.Rectangle2D;
16
import java.beans.PropertyChangeEvent;
17
import java.beans.PropertyChangeListener;
10 18
import java.io.Serializable;
11 19

  
12 20
import javax.swing.ImageIcon;
......
22 30
import com.iver.cit.gvsig.gui.wizards.WFSWizardData;
23 31
import com.iver.cit.gvsig.project.documents.view.gui.View;
24 32
import javax.swing.JButton;
33
import javax.swing.event.CaretEvent;
34
import javax.swing.event.CaretListener;
25 35

  
36
import org.gvsig.gui.beans.swing.jTextField.JTextFieldWithSpecificCaretPosition;
37

  
38

  
26 39
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
27 40
 *
28 41
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
......
67 80
 *
68 81
 * $Id$
69 82
 * $Log$
70
 * Revision 1.6  2007-01-25 09:31:09  ppiqueras
83
 * Revision 1.7  2007-01-25 14:37:16  ppiqueras
84
 * Utiliza JTextFieldWithSpecificCaretPosition
85
 *
86
 * Revision 1.6  2007/01/25 09:31:09  ppiqueras
71 87
 * Mejorada la interfaz.
72 88
 *
73 89
 * Revision 1.5  2007/01/19 14:24:30  ppiqueras
......
556 572
		private JLabel jLabelVertex1Y = null;
557 573
		private JLabel jLabelVertex2X = null;
558 574
		private JLabel jLabelVertex2Y = null;
559
		private JTextField jTextFieldVertex1X = null;
560
		private JTextField jTextFieldVertex1Y = null;
561
		private JTextField jTextFieldVertex2X = null;
562
		private JTextField jTextFieldVertex2Y = null;
575
		private JTextFieldWithSpecificCaretPosition jTextFieldVertex1X = null;
576
		private JTextFieldWithSpecificCaretPosition jTextFieldVertex1Y = null;
577
		private JTextFieldWithSpecificCaretPosition jTextFieldVertex2X = null;
578
		private JTextFieldWithSpecificCaretPosition jTextFieldVertex2Y = null;
563 579
		private JRadioButton jRadioButtonGoToArea = null;
580
		
581
//		private FocusAdapter focusAdapterForJTextFields = null;
564 582

  
565 583
		/**
566 584
		 * This is the default constructor
......
822 840
			
823 841
			return jLabelVertex2Y;
824 842
		}
843
//		
844
//		/**
845
//		 * This method initializes a FocusAdapter event adapter, it's 'focusLost()' method for set the caret position of
846
//		 *   the JTextField (source which generates the event of focusLost), to the first position.
847
//		 * This adapter is done for use only with the JTextFields of the coordenates
848
//		 * 
849
//		 * @return java.awt.event.FocusAdapter
850
//		 */
851
//		private FocusAdapter getJFocusAdapterForJTextFields() {
852
//			if (focusAdapterForJTextFields == null) {
853
//				focusAdapterForJTextFields = new FocusAdapter() {
854
//					/*
855
//					 *  (non-Javadoc)
856
//					 * @see java.awt.event.FocusListener#focusLost(java.awt.event.FocusEvent)
857
//					 */
858
//					public void focusLost(FocusEvent e) {
859
//						((JTextField)e.getSource()).setCaretPosition(0);
860
//					}					
861
//				};
862
//			}
863
//			return focusAdapterForJTextFields;
864
//		}
825 865

  
826 866
		/**
827 867
		 * This method initializes jTextFieldVertex1X	
......
830 870
		 */
831 871
		private JTextField getJTextFieldVertex1X() {
832 872
			if (jTextFieldVertex1X == null) {
833
				jTextFieldVertex1X = new JTextField();
873
				jTextFieldVertex1X = new JTextFieldWithSpecificCaretPosition();
834 874
				jTextFieldVertex1X.setPreferredSize(new Dimension(DEFAULT_TEXT_FIELDS_WIDTH, DEFAULT_LABELS_AND_TEXT_FIELDS_HEIGHT));
835 875
				jTextFieldVertex1X.setToolTipText(PluginServices.getText(this, "x_coordinate_from_area_left_up_vertex"));
836 876
			}
......
844 884
		 */
845 885
		private JTextField getJTextFieldVertex1Y() {
846 886
			if (jTextFieldVertex1Y == null) {
847
				jTextFieldVertex1Y = new JTextField();
887
				jTextFieldVertex1Y = new JTextFieldWithSpecificCaretPosition();
848 888
				jTextFieldVertex1Y.setPreferredSize(new Dimension(DEFAULT_TEXT_FIELDS_WIDTH, DEFAULT_LABELS_AND_TEXT_FIELDS_HEIGHT));
849 889
				jTextFieldVertex1Y.setToolTipText(PluginServices.getText(this, "y_coordinate_from_area_left_up_vertex"));
850 890
			}
......
858 898
		 */
859 899
		private JTextField getJTextFieldVertex2X() {
860 900
			if (jTextFieldVertex2X == null) {
861
				jTextFieldVertex2X = new JTextField();
901
				jTextFieldVertex2X = new JTextFieldWithSpecificCaretPosition();
862 902
				jTextFieldVertex2X.setPreferredSize(new Dimension(DEFAULT_TEXT_FIELDS_WIDTH, DEFAULT_LABELS_AND_TEXT_FIELDS_HEIGHT));
863 903
				jTextFieldVertex2X.setToolTipText(PluginServices.getText(this, "x_coordinate_from_area_right_bottom_vertex"));
864 904
			}
......
872 912
		 */
873 913
		private JTextField getJTextFieldVertex2Y() {
874 914
			if (jTextFieldVertex2Y == null) {
875
				jTextFieldVertex2Y = new JTextField();
915
				jTextFieldVertex2Y = new JTextFieldWithSpecificCaretPosition();
876 916
				jTextFieldVertex2Y.setPreferredSize(new Dimension(DEFAULT_TEXT_FIELDS_WIDTH, DEFAULT_LABELS_AND_TEXT_FIELDS_HEIGHT));			
877 917
				jTextFieldVertex2Y.setToolTipText(PluginServices.getText(this, "y_coordinate_from_area_right_bottom_vertex"));
878 918
			}

Also available in: Unified diff