Revision 10786 branches/F2/extensions/extJCRS/src/org/gvsig/crs/gui/CRSMainPanel.java

View differences:

CRSMainPanel.java
47 47
import java.awt.GridLayout;
48 48
import java.awt.event.ActionEvent;
49 49

  
50

  
50 51
import javax.swing.BorderFactory;
51 52
import javax.swing.JButton;
52 53
import javax.swing.JComboBox;
......
59 60
import org.gvsig.crs.gui.panels.EPSGpanel;
60 61
import org.gvsig.crs.gui.panels.ESRIpanel;
61 62
import org.gvsig.crs.gui.panels.IAU2000panel;
63
import org.gvsig.crs.gui.panels.NewCRSPanel;
62 64

  
63 65
import com.iver.andami.PluginServices;
64 66
import com.iver.andami.ui.mdiManager.IWindow;
......
68 70
 * Clase que genera el panel principal para la selecci?n de CRS 
69 71
 * 
70 72
 * @author Jos? Luis G?mez Mart?nez (jolugomar@gmail.com)
73
 * @author Luisa Marina Fernandez (luisam.fernandez@uclm.es)
71 74
 *
72 75
 */
73 76
public class CRSMainPanel extends JPanel implements IWindow {
......
86 89
	final String newCRS = PluginServices.getText(this,"nuevo_crs");
87 90
	
88 91
	//String[] selection = {recientes, epsg, usgs, esri, iau2000, newCRS};
89
	String[] selection = {recientes, epsg, iau2000};//, esri};
92
	String[] selection = {recientes, epsg, iau2000,newCRS};//, esri};
90 93
	
91 94
	boolean inAnApplet = true;	
92 95
	public CrsRecentsPanel crsRecentsPanel = null;
93 96
	public EPSGpanel epsgPanel = null;
94 97
	public ESRIpanel esriPanel = null;
95 98
	public IAU2000panel iauPanel = null;
99
	public NewCRSPanel newCrsPanel=null;
96 100
	
97 101
	private JPanel jPanelMain = null;	
98 102
	
......
107 111
		epsgPanel = new EPSGpanel();
108 112
		esriPanel = new ESRIpanel();
109 113
		iauPanel = new IAU2000panel();
114
		newCrsPanel=new NewCRSPanel();
110 115
		
111 116
		this.add(vista(), BorderLayout.NORTH);		
112 117
		this.add(getJPanelButtons(), BorderLayout.SOUTH);
......
119 124
		epsgPanel = new EPSGpanel();
120 125
		esriPanel = new ESRIpanel();
121 126
		iauPanel = new IAU2000panel();
127
		newCrsPanel=new NewCRSPanel();
122 128
		
123 129
		setDataSource(selection[0]);
124 130
	}
......
130 136
	 */
131 137
	public JPanel capa(){
132 138
		JPanel p = new JPanel();
133
		p.setPreferredSize(new Dimension(550, 320));
134
		p.setLayout(new GridLayout(0,1));
135
		p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));	
136
		p.setBorder(
137
			    BorderFactory.createCompoundBorder(
138
						BorderFactory.createCompoundBorder(
139
								BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_capa")),
140
								BorderFactory.createEmptyBorder(1,1,1,1)),
141
								p.getBorder()));
142
		p.add(getCombopanel());
143
		p.add(getJPanelMain());
139
		//**p.setPreferredSize(new Dimension(550, 320));
140
		//**p.setLayout(new GridLayout(0,1));
141
		//p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
142
		p.setLayout(new BorderLayout());
143
		p.setBorder(BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_capa")));//,
144
								/*BorderFactory.createEmptyBorder(1,1,1,1)),
145
								p.getBorder()));*/
146
		p.add(getCombopanel(),BorderLayout.NORTH);
147
		p.add(getJPanelMain(),BorderLayout.CENTER);
144 148
		return p;
145 149
	}
146 150
	
147
	/**
148
	 * Panel con los controles necesarios del panel de selecci?n de CRS 
149
	 * de la vista actual
150
	 * @return
151
	 */
152 151
	public JPanel vista(){
153 152
		JPanel p = new JPanel();
154
		p.setPreferredSize(new Dimension(550, 320));
155
		p.setLayout(new GridLayout(0,1));
156
		p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
157
		p.setBorder(
153
		//p.setPreferredSize(new Dimension(550, 320));
154
		//p.setLayout(new GridLayout(0,1));
155
		//p.setLayout(new FlowLayout(FlowLayout.LEFT,10,10));
156
		/*p.setBorder(
158 157
			    BorderFactory.createCompoundBorder(
159 158
						BorderFactory.createCompoundBorder(
160 159
								BorderFactory.createTitledBorder(PluginServices.getText(this,"seleccione_crs_vista")),
161 160
								BorderFactory.createEmptyBorder(2,2,2,2)),
162
								p.getBorder()));
163
		p.add(getCombopanel());
164
		p.add(getJPanelMain());
161
								p.getBorder()));*/
162
		p.setLayout(new BorderLayout());
163
		p.add(getCombopanel(),BorderLayout.NORTH);
164
		p.add(getJPanelMain(),BorderLayout.CENTER);
165 165
		return p;
166 166
	}
167 167
	
......
172 172
			jPanelMain.setPreferredSize(new Dimension(525, 230));	
173 173
			jPanelMain.add(recientes, crsRecentsPanel);
174 174
			jPanelMain.add(epsg, epsgPanel);
175
			jPanelMain.add(newCRS,newCrsPanel);
175 176
			jPanelMain.add(esri, esriPanel);
176 177
			jPanelMain.add(usgs, getJPanelUSGS());
177 178
			jPanelMain.add(iau2000, iauPanel);
......
183 184
	public JPanel getCombopanel(){
184 185
		if (Combopanel == null){
185 186
			Combopanel = new JPanel();
186
			Combopanel.setPreferredSize(new Dimension(525,30));
187
			Combopanel.setLayout(new FlowLayout(FlowLayout.CENTER,10,5));
187 188
			Combopanel.add(getJLabelTipo());
188 189
			Combopanel.add(getJComboOptions());
189 190
		}
......
222 223
		if(jPanelButtons == null) {
223 224
			jPanelButtons = new JPanel();
224 225
			jPanelButtons.setLayout(new FlowLayout(FlowLayout.RIGHT));
225
			jPanelButtons.setPreferredSize(new Dimension(525,50));
226
			//jPanelButtons.setPreferredSize(new Dimension(525,50));
226 227
			jPanelButtons.add(getJButtonCancel(),null);
227 228
			jPanelButtons.add(getJButtonAccept(),null);			
228 229
		}
......
251 252
			jButtonAccept.setPreferredSize(new Dimension(100,25));
252 253
			jButtonAccept.setEnabled(false);
253 254
			jButtonAccept.setMnemonic('A');
254
			jButtonAccept.setToolTipText("Accept");			
255
			jButtonAccept.setToolTipText(PluginServices.getText(this,"ok"));			
255 256
		}
256 257
		return jButtonAccept;
257 258
	}
......
299 300
	public ESRIpanel getEsriPanel() {
300 301
		return esriPanel;
301 302
	}
302

  
303

  
304

  
305 303
	public IAU2000panel getIauPanel() {
306 304
		return iauPanel;
307 305
	}
......
310 308
		return crsRecentsPanel;
311 309
	}
312 310

  
311
	public NewCRSPanel getNewCrsPanel() {
312
		return newCrsPanel;
313
	}
314

  
313 315
}

Also available in: Unified diff