Revision 7020 trunk/libraries/libJCRS/src/org/gvsig/crs/ui/CrsView.java

View differences:

CrsView.java
9 9

  
10 10
import javax.swing.BorderFactory;
11 11
import javax.swing.JButton;
12
import javax.swing.JCheckBox;
13 12
import javax.swing.JPanel;
14 13
import javax.swing.JRadioButton;
15 14
import javax.swing.ListSelectionModel;
......
22 21
import org.gvsig.crs.Query;
23 22

  
24 23
import com.iver.andami.PluginServices;
25
import com.iver.andami.ui.mdiManager.View;
26
import com.iver.andami.ui.mdiManager.ViewInfo;
24
import com.iver.andami.ui.mdiManager.IWindow;
25
import com.iver.andami.ui.mdiManager.WindowInfo;
27 26
import com.iver.cit.gvsig.gui.panels.ProjChooserPanel;
28 27
import com.iver.cit.gvsig.gui.panels.ProjChooserPanelTransformation;
29 28

  
30
public class CrsView extends JPanel implements View, ListSelectionListener{
29
public class CrsView extends JPanel implements IWindow, ListSelectionListener{
31 30

  
32 31
	private static final long serialVersionUID = 1L;
33 32
	
......
236 235
	}
237 236
	
238 237
	private void accept_actionPerformed(ActionEvent e) {
239
		PluginServices.getMDIManager().closeView(this);
238
		PluginServices.getMDIManager().closeWindow(this);
240 239
	}
241 240
	
242 241
	
......
257 256
	
258 257
	private void next_actionPerformed(ActionEvent e) {
259 258
		if(epsgTrans.isSelected() == true && contentPane.getCodeCRS() != -1){
260
			//PluginServices.getMDIManager().closeView(this);
259
			//PluginServices.getMDIManager().closeWindow(this);
261 260
			TransformationEpsgPanel tr = new TransformationEpsgPanel(contentPane.getWKT(),contentPane.getCodeCRS(),
262 261
					crs_target);
263 262
			tr.setSize(new Dimension(550, 400));
264 263
			tr.setLayout(new GridLayout(2,2));
265 264
			tr.setLayout(new FlowLayout(FlowLayout.LEFT,5,20));
266
			PluginServices.getMDIManager().addView(tr);
265
			PluginServices.getMDIManager().addWindow(tr);
267 266
			setProjection(tr.getProjection());
268 267
			
269 268
		}else if(nadgrids.isSelected() == true && contentPane.getCodeCRS() != -1) {
270
			//PluginServices.getMDIManager().closeView(this);
269
			//PluginServices.getMDIManager().closeWindow(this);
271 270
			TransformationNadgridsPanel tn = new TransformationNadgridsPanel(contentPane.getWKT(),contentPane.getCodeCRS());
272 271
			tn.setSize(new Dimension(550, 275));
273 272
			tn.setLayout(new GridLayout(2,2));
274 273
			tn.setLayout(new FlowLayout(FlowLayout.LEFT,5,10));
275
			PluginServices.getMDIManager().addView(tn);
274
			PluginServices.getMDIManager().addWindow(tn);
276 275
			setProjection(tn.getProjection());
277 276
		}else if(manualTrans.isSelected() == true && contentPane.getCodeCRS() != -1) {
278
			//PluginServices.getMDIManager().closeView(this);
277
			//PluginServices.getMDIManager().closeWindow(this);
279 278
			TransformationManualPanel tm = new TransformationManualPanel(contentPane.getWKT(),contentPane.getCodeCRS());
280 279
			tm.setSize(new Dimension(550, 400));
281 280
			tm.setLayout(new GridLayout(2,2));
282 281
			tm.setLayout(new FlowLayout(FlowLayout.LEFT,5,10));
283
			PluginServices.getMDIManager().addView(tm);
282
			PluginServices.getMDIManager().addWindow(tm);
284 283
		}/*else if(withOutTrans.isSelected() == true && contentPane.getCodeCRS() != -1) {
285
			PluginServices.getMDIManager().closeView(this);
284
			PluginServices.getMDIManager().closeWindow(this);
286 285
			WithoutTranformation wt = new WithoutTranformation(contentPane.getWKT(),contentPane.getCodeCRS());
287 286
			wt.setSize(new Dimension(550, 200));
288 287
			wt.setLayout(new GridLayout(2,2));
289 288
			wt.setLayout(new FlowLayout(FlowLayout.LEFT,5,10));
290
			PluginServices.getMDIManager().addView(wt);			
289
			PluginServices.getMDIManager().addWindow(wt);			
291 290
		}*/
292 291
	}
293 292
	
......
308 307
	}
309 308
	
310 309
	private void cancel_actionPerformed(ActionEvent e) {
311
		PluginServices.getMDIManager().closeView(this);
310
		PluginServices.getMDIManager().closeWindow(this);
312 311
	}
313 312
	
314 313
	public ICrs getProjection() {
......
318 317
	public void setProjection(IProjection proj) {
319 318
		crsfirst = proj;
320 319
	}
321
	
322
	public ViewInfo getViewInfo() {
323
		ViewInfo m_viewinfo=new ViewInfo(ViewInfo.MODALDIALOG);
324
   		m_viewinfo.setTitle(PluginServices.getText(this,"CrsView"));
325
		return m_viewinfo;
326
	}
327
	
320
		
328 321
	public void valueChanged(ListSelectionEvent e) {
329 322
		ListSelectionModel lsm = (ListSelectionModel)e.getSource();
330 323
        if (lsm.isSelectionEmpty()) {
......
406 399
	
407 400
		
408 401
	}
402
	public WindowInfo getWindowInfo() {
403
		WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
404
   		m_viewinfo.setTitle(PluginServices.getText(this,"CrsView"));
405
		return m_viewinfo;
406
	}
409 407
}

Also available in: Unified diff