Statistics
| Revision:

root / trunk / libraries / libJCRS / src / org / gvsig / crs / gui / dialog / TRSelectionDialog.java @ 7823

History | View | Annotate | Download (1.71 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.gui.TransformationSelectionDialogPanel;
11

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

    
16
/**
17
 * @author Luis W. Sevilla (sevilla_lui@gva.es)
18
 */
19
public class TRSelectionDialog
20
        extends TransformationSelectionDialogPanel implements IWindow {
21
        /**
22
         * 
23
         */
24
        private static final long serialVersionUID = 1L;
25
        private boolean okPressed = false;
26
        private IProjection lastProj = null;
27
        boolean targetNad = false;
28

    
29
        /**
30
         * 
31
         */
32
        public TRSelectionDialog() {
33
                super();
34
                this.init();
35
        }
36
        /**
37
         * This method initializes this
38
         * 
39
         * @return void
40
         */
41
        private void init() {                
42
                this.setBounds(0, 0, 600, 500);
43
                this.setLayout(new GridLayout(0,1));
44
                this.setLayout(new FlowLayout(FlowLayout.CENTER,10,10));
45
                
46
                                
47
        }
48
        
49
        public boolean isOkPressed() { return okPressed; }
50
        
51
        public void setTargetNad(boolean tarNad){
52
                targetNad = tarNad;
53
        }
54
        
55
        public boolean getTargetNad(){
56
                return targetNad;
57
        }
58
        
59
        /**
60
         * @return
61
         */
62
        public IProjection getProjection() {
63
                return (IProjection) getProjPanel().getProjection();
64
        }
65
        /**
66
         * @param proj
67
         */
68
        public void setProjection(IProjection proj) {
69
                lastProj = proj;
70
                getProjPanel().setProjection(proj);
71
        }
72
        
73
        public String getProjectionName(){
74
                return (String) getProjPanel().getProjection().getCrsWkt().getName();                                
75
        }
76
        public WindowInfo getWindowInfo() {
77
                WindowInfo m_viewinfo=new WindowInfo(WindowInfo.MODALDIALOG);
78
                   m_viewinfo.setTitle(PluginServices.getText(this, "selecciona_sistema_de_referencia"));
79
                return m_viewinfo;
80
        }
81
}