Statistics
| Revision:

root / branches / F2 / extensions / extJCRS / src / org / gvsig / crs / gui / dialog / TRSelectionDialog.java @ 10786

History | View | Annotate | Download (1.83 KB)

1
/*
2
 * Created on 26-ene-2005
3
 */
4
package org.gvsig.crs.gui.dialog;
5

    
6
import java.awt.FlowLayout;
7
import java.awt.GridLayout;
8

    
9
import org.cresques.cts.IProjection;
10
import org.gvsig.crs.ICrs;
11
import org.gvsig.crs.gui.CRSSelectionTrDialog;
12

    
13
import com.iver.andami.PluginServices;
14
import com.iver.andami.ui.mdiManager.IWindow;
15
import com.iver.andami.ui.mdiManager.WindowInfo;
16

    
17
/**
18
 * @author Luis W. Sevilla (sevilla_lui@gva.es)
19
 */
20
public class TRSelectionDialog
21
        extends CRSSelectionTrDialog implements IWindow {
22
        /**
23
         * 
24
         */
25
        private static final long serialVersionUID = 1L;
26
        private boolean okPressed = false;
27
        private IProjection lastProj = null;
28
        boolean targetNad = false;
29
        
30
        /**
31
         * 
32
         */
33
        public TRSelectionDialog(ICrs curproj) {
34
                super(curproj);
35
                this.init();                
36
        }
37
        /**
38
         * This method initializes this
39
         * 
40
         * @return void
41
         */
42
        private void init() {                
43
                this.setBounds(0, 0, 600, 500);
44
                this.setLayout(new GridLayout(0,1));
45
                this.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
46
                
47
                                
48
        }
49
        
50
        public boolean isOkPressed() { return okPressed; }
51
        
52
        public void setTargetNad(boolean tarNad){
53
                targetNad = tarNad;
54
        }
55
        
56
        public boolean getTargetNad(){
57
                return targetNad;
58
        }
59
        
60
        /**
61
         * @return
62
         */
63
        public IProjection getProjection() {
64
                return (IProjection) getProjPanel().getProjection();
65
        }
66
        /**
67
         * @param proj
68
         */
69
        public void setProjection(IProjection proj) {
70
                lastProj = proj;
71
                getProjPanel().setProjection(proj);
72
        }
73
        
74
        public String getProjectionName(){
75
                return (String) getProjPanel().getProjection().getCrsWkt().getName();                                
76
        }
77
        public WindowInfo getWindowInfo() {
78
                WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
79
                   m_viewinfo.setTitle(PluginServices.getText(this, "selecciona_sistema_de_referencia"));
80
                   //definir anchura y altura
81
                   m_viewinfo.setWidth(520);
82
                   m_viewinfo.setHeight(350);
83
                return m_viewinfo;
84
        }
85
}