Revision 2972 trunk/extensions/extGeoreferencing/src/com/iver/cit/gvsig/gui/Panels/SelectPointsPanel.java

View differences:

SelectPointsPanel.java
167 167
    		getTY().setText(""+pto.pixelPoint.getY());
168 168
    	}
169 169
    	if(pto.mapPoint != null){
170
    		getLatitud().setText(""+pto.mapPoint.getX());
171
    		getLongitud().setText(""+pto.mapPoint.getY());
170
    		getLatitud().setText(""+pto.mapPoint.getY());
171
    		getLongitud().setText(""+pto.mapPoint.getX());
172 172
    	}
173 173
	}
174 174
	
......
331 331
		if (cPoint == null) {
332 332
			cPoint = new JComboBox();
333 333
			cPoint.addActionListener(new java.awt.event.ActionListener() { 
334
				public void actionPerformed(java.awt.event.ActionEvent e) {
334
				public void actionPerformed(java.awt.event.ActionEvent e) { 
335 335
					 if(getCPoint().getSelectedIndex() != -1){
336 336
						 if(!isNew){
337
							 changePoint(false, 0); 
337
						 	loadInfoPoint(getCPoint().getSelectedIndex());
338
				        	checkArrows();
338 339
						 }
339
						 isNew = false;
340 340
					 }
341
					 isNew = false;
341 342
				}
342 343
			});
343 344
		}
......
618 619
	 * un punto con el valor actual de l JTextField. Si no hay puntos en la 
619 620
	 * lista no salvar? ning?n valor.
620 621
	 */
621
	public void checkTextField(JTextField tf, boolean xValue, boolean pixelValue, int code){		
622
	public void checkTextField(JTextField tf, boolean xValue, boolean pixelValue, int code){
623
		System.out.println("--->"+code);
624
		
625
		//Ignoramos las teclas Del, Spr, Mayusculas, Alt, Ctrl, Enter
626
		if(code == 8 || code == 127 || code == 16 || code == 20 ||
627
				code == 18 || code == 17 || code == 10 )
628
			return;
629
		
622 630
		//Si el caracter introducido es erroneo avisamos y volvemos
623 631
		if((code < 48 || code > 57) && code != 46){
624 632
			tf.setText("");
......
712 720
		if (tLatitud == null) {
713 721
			tLatitud = new JTextField();
714 722
			tLatitud.setPreferredSize(new java.awt.Dimension(111,19));
723
			tLatitud.setHorizontalAlignment(javax.swing.JTextField.LEFT);
715 724
			tLatitud.addKeyListener(new java.awt.event.KeyListener() { 
716 725
				public void keyPressed(java.awt.event.KeyEvent e) {}
717 726
				public void keyReleased(java.awt.event.KeyEvent e) {
......
735 744
		if (tLongitud == null) {
736 745
			tLongitud = new JTextField();
737 746
			tLongitud.setPreferredSize(new java.awt.Dimension(111,19));
747
			tLongitud.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
738 748
			tLongitud.addKeyListener(new java.awt.event.KeyListener() { 
739 749
				public void keyPressed(java.awt.event.KeyEvent e) {}
740 750
				public void keyReleased(java.awt.event.KeyEvent e) {

Also available in: Unified diff