Revision 4827 trunk/extensions/extGPS/src/org/gvsig/gps/panel/GPSConfigPanel.java

View differences:

GPSConfigPanel.java
43 43
 *
44 44
 * $Id$
45 45
 * $Log$
46
 * Revision 1.7  2006-04-11 13:19:51  jaume
46
 * Revision 1.8  2006-04-12 06:49:47  jaume
47 47
 * *** empty log message ***
48 48
 *
49
 * Revision 1.7  2006/04/11 13:19:51  jaume
50
 * *** empty log message ***
51
 *
49 52
 * Revision 1.6  2006/04/10 17:13:28  jaume
50 53
 * *** empty log message ***
51 54
 *
......
71 74
import gnu.io.CommPortIdentifier;
72 75

  
73 76
import java.awt.Component;
74
import java.util.ArrayList;
75 77
import java.util.Enumeration;
76 78

  
77 79
import javax.swing.JButton;
......
85 87
import org.gvsig.gps.tools.PointCalibrate;
86 88

  
87 89
import com.iver.andami.PluginServices;
90
import com.iver.andami.ui.mdiManager.SingletonView;
88 91
import com.iver.andami.ui.mdiManager.View;
89 92
import com.iver.andami.ui.mdiManager.ViewInfo;
90 93
import com.iver.cit.gvsig.fmap.MapControl;
91 94
import com.iver.cit.gvsig.fmap.tools.Behavior.PointBehavior;
92 95
import com.iver.utiles.XMLEntity;
93 96

  
94
public class GPSConfigPanel extends JPanel implements View{
97
public class GPSConfigPanel extends JPanel implements SingletonView{
98
	public static String viewModel = "GPSConfigPanel";
95 99
	private JComboBox cmbPorts = null;
96 100
	private JPanel pnlPortConfig = null;
97 101
	private JTextField txtSampleRate;
......
312 316
		return btnCancel;
313 317
	}
314 318

  
315
	protected void cancel() {
319
	private void cancel() {
316 320
		PluginServices.getMDIManager().closeView(this);		
317 321
	}
318 322
	
319
	protected void ok() {
323
	private void ok() {
320 324
		try {
321 325
			control.setSampleRate(Integer.parseInt(txtSampleRate.getText()));
322 326
			control.setPortSpeed(Integer.parseInt((String) cmbPortSpeed.getSelectedItem()));
......
449 453
					PointCalibrate calibrator = new PointCalibrate(v, currentTool);
450 454
					mc.addMapTool(toolName, new PointBehavior(calibrator));
451 455
					mc.setTool(toolName);
456
					PluginServices.getMDIManager().addView(v);
452 457
					return;
453 458
				}
454 459
			}
......
478 483
		btnCalibrate.setEnabled(cmbViews.isEnabled());
479 484
		return cmbViews;
480 485
	}
486

  
487
	public Object getViewModel() {
488
		return viewModel;
489
	}
481 490
}

Also available in: Unified diff