Statistics
| Revision:

gvsig-raster / org.gvsig.raster.georeferencing / trunk / org.gvsig.raster.georeferencing / org.gvsig.raster.georeferencing.framework / org.gvsig.raster.georeferencing.framework.andami / src / main / java / org / gvsig / raster / georeferencing / framework / andami / GeorefViewWindow.java @ 1725

History | View | Annotate | Download (2.94 KB)

1
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
2
 *
3
 * Copyright (C) 2007 IVER T.I. and Generalitat Valenciana.
4
 *
5
 * This program is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU General Public License
7
 * as published by the Free Software Foundation; either version 2
8
 * of the License, or (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program; if not, write to the Free Software
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
18
 */
19
package org.gvsig.raster.georeferencing.framework.andami;
20

    
21
import java.awt.BorderLayout;
22

    
23
import javax.swing.JPanel;
24

    
25
import org.gvsig.andami.ui.mdiManager.IWindow;
26
import org.gvsig.andami.ui.mdiManager.WindowInfo;
27
import org.gvsig.i18n.Messages;
28

    
29
/**
30
 * Panel que contiene el panel con la vista a georreferenciar
31
 * 
32
 * 22/12/2007
33
 * @author Nacho Brodin (nachobrodin@gmail.com)
34
 */
35
public class GeorefViewWindow extends JPanel implements IWindow {
36
        private static final long         serialVersionUID = 1L;
37
        private int                       w = 640;
38
        private int                       h = 100;
39
        private int                       posX = 0;
40
        private int                       posY = 0;
41
        
42
        /**
43
         * Constructor.
44
         * Crea la composici?n de controles de zoom.
45
         * @param posX Posici?n en X
46
         * @param posY Posici?n en Y
47
         * @param w Tama?o en pixeles de ancho
48
         * @param h Tama?o en pixeles de alto
49
         */
50
        public GeorefViewWindow(JPanel panel, int posX, int posY, int w, int h) {
51
                setPosition(posX, posY);
52
                setWindowsSize(w, h);
53
                setLayout(new BorderLayout());
54
                add(panel, BorderLayout.CENTER);
55
        }
56
        
57
        /**
58
         * Asigna la posici?n de la ventana
59
         * @param posX Posici?n en X
60
         * @param posY Posici?n en Y
61
         */
62
        public void setPosition(int posX, int posY) {
63
                this.posX = posX;
64
                this.posY = posY;
65
        }
66
        
67
        /**
68
         * Asigna el tama?o de la ventana
69
         * @param w Tama?o en pixeles de ancho
70
         * @param h Tama?o en pixeles de alto
71
         */
72
        public void setWindowsSize(int w, int h) {
73
                this.w = w;
74
                this.h = h;
75
        }
76
        
77
        /*
78
         * (non-Javadoc)
79
         * @see com.iver.andami.ui.mdiManager.IWindow#getWindowInfo()
80
         */
81
        public WindowInfo getWindowInfo() {
82
                WindowInfo m_viewinfo = new WindowInfo(WindowInfo.MODELESSDIALOG | WindowInfo.RESIZABLE | WindowInfo.NOTCLOSABLE | WindowInfo.MAXIMIZABLE);
83
                //if (getClippingPanel().getFLayer() != null)
84
                        //m_viewinfo.setAdditionalInfo(getClippingPanel().getFLayer().getName());
85
                m_viewinfo.setTitle(Messages.getText("view_panel"));
86
                m_viewinfo.setX(posX);
87
                m_viewinfo.setY(posY);
88
                m_viewinfo.setHeight(h);
89
                m_viewinfo.setWidth(w);
90
                return m_viewinfo;
91
        }
92
        
93
        public Object getWindowProfile(){
94
                return WindowInfo.TOOL_PROFILE;
95
        }
96

    
97
}
98