Revision 8136 trunk/libraries/libJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java

View differences:

CRSMainPanel.java
5 5
import java.awt.FlowLayout;
6 6
import java.awt.GridLayout;
7 7
import java.awt.event.ActionEvent;
8
import java.awt.event.ItemEvent;
9
import java.awt.event.ItemListener;
10 8

  
11 9
import javax.swing.BorderFactory;
12 10
import javax.swing.JButton;
......
25 23
import com.iver.andami.ui.mdiManager.IWindow;
26 24
import com.iver.andami.ui.mdiManager.WindowInfo;
27 25

  
28
public class CRSMainPanel extends JPanel implements ItemListener, IWindow {
26
public class CRSMainPanel extends JPanel implements IWindow {
29 27
	
30 28
	/**
31 29
	 * 
......
148 146
			jComboOptions = new JComboBox(selection);
149 147
			jComboOptions.setPreferredSize(new Dimension(100,25));			
150 148
			jComboOptions.setEditable(false);
151
			jComboOptions.setSelectedIndex(0);			
152
			//jComboOptions.addItemListener(this);			
149
			jComboOptions.setSelectedIndex(0);					
153 150
		}
154 151
		return jComboOptions;
155 152
	}
156
	
157
	public void itemStateChanged(ItemEvent e) {
158
		CardLayout cl = (CardLayout)(jPanelMain.getLayout());
159
		String op = (String)e.getItem();		
160
		if (op.equals("EPSG")){
161
			ep.connection();						
162
		} else if (op.equals("IAU2000")) {
163
			iau.connection();
164
		}
165
	    cl.show(jPanelMain, (String)e.getItem());
166
	    setDataSource((String)e.getItem());
167
	}
168 153
			
169 154
	public JPanel getJPanelUSGS() {	
170 155
		if (USGSpanel == null){

Also available in: Unified diff