Statistics
| Revision:

root / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / project / documents / view / gui / MapOverViewPalette.java @ 38564

History | View | Annotate | Download (2.6 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 * 
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 * 
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 * 
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
19
 * MA  02110-1301, USA.
20
 * 
21
 */
22
package org.gvsig.app.project.documents.view.gui;
23

    
24
import javax.swing.JPanel;
25

    
26
import org.gvsig.andami.PluginServices;
27
import org.gvsig.andami.ui.mdiManager.IWindow;
28
import org.gvsig.andami.ui.mdiManager.IWindowTransform;
29
import org.gvsig.andami.ui.mdiManager.WindowInfo;
30
import org.gvsig.app.project.documents.view.MapOverview;
31

    
32
public class MapOverViewPalette extends JPanel implements IWindow,
33
    IWindowTransform {
34

    
35
    private static final long serialVersionUID = 3254895082290314502L;
36
    private MapOverview mov;
37
    private DefaultViewPanel view;
38

    
39
    public MapOverViewPalette(MapOverview mapOverView, IView view) {
40
        super();
41
        mov = mapOverView;
42
        this.view = (DefaultViewPanel) view;
43
        initialize();
44
        this.add(mov);
45
    }
46

    
47
    /**
48
     * This method initializes this
49
     * 
50
     * @return void
51
     */
52
    private void initialize() {
53
        this.setSize(300, 200);
54
        this.setBackground(java.awt.SystemColor.control);
55
        this.setBorder(javax.swing.BorderFactory.createLineBorder(
56
            java.awt.Color.gray, 0));
57
    }
58

    
59
    public WindowInfo getWindowInfo() {
60
        WindowInfo m_viewinfo =
61
            new WindowInfo(WindowInfo.ICONIFIABLE | WindowInfo.MODELESSDIALOG
62
                | WindowInfo.PALETTE);
63
        m_viewinfo.setTitle(PluginServices.getText(this, "localizador"));
64
        m_viewinfo.setWidth(mov.getWidth() + 20);
65
        m_viewinfo.setHeight(mov.getHeight());
66

    
67
        return m_viewinfo;
68
    }
69

    
70
    public void toPalette() {
71
        view.toPalette();
72

    
73
    }
74

    
75
    public void restore() {
76
        view.restore();
77

    
78
    }
79

    
80
    public boolean isPalette() {
81
        return true;
82
    }
83

    
84
    public Object getWindowProfile() {
85
        return WindowInfo.TOOL_PROFILE;
86
    }
87

    
88
}