svn-gvsig-desktop / branches / v2_0_0_prep / applications / appgvSIG / src / org / gvsig / app / project / documents / view / gui / MapOverViewPalette.java @ 40331
History | View | Annotate | Download (2.6 KB)
1 | 36475 | cordinyana | /* 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 | 29596 | jpiera | package org.gvsig.app.project.documents.view.gui; |
23 | 7304 | caballero | |
24 | import javax.swing.JPanel; |
||
25 | |||
26 | 29596 | jpiera | 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 | 7304 | caballero | |
32 | 36475 | cordinyana | public class MapOverViewPalette extends JPanel implements IWindow, |
33 | IWindowTransform { |
||
34 | 29596 | jpiera | |
35 | 36475 | cordinyana | private static final long serialVersionUID = 3254895082290314502L; |
36 | private MapOverview mov;
|
||
37 | private DefaultViewPanel view;
|
||
38 | 7304 | caballero | |
39 | 36475 | cordinyana | public MapOverViewPalette(MapOverview mapOverView, IView view) {
|
40 | super();
|
||
41 | mov = mapOverView; |
||
42 | this.view = (DefaultViewPanel) view;
|
||
43 | initialize(); |
||
44 | this.add(mov);
|
||
45 | } |
||
46 | 7304 | caballero | |
47 | 36475 | cordinyana | /**
|
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 | 7304 | caballero | |
59 | 36475 | cordinyana | 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 | 7304 | caballero | |
67 | 36475 | cordinyana | return m_viewinfo;
|
68 | } |
||
69 | 7304 | caballero | |
70 | 36475 | cordinyana | public void toPalette() { |
71 | view.toPalette(); |
||
72 | 7304 | caballero | |
73 | 36475 | cordinyana | } |
74 | 7571 | caballero | |
75 | 36475 | cordinyana | public void restore() { |
76 | view.restore(); |
||
77 | 7571 | caballero | |
78 | 36475 | cordinyana | } |
79 | 7571 | caballero | |
80 | 36475 | cordinyana | public boolean isPalette() { |
81 | return true; |
||
82 | } |
||
83 | 7571 | caballero | |
84 | 36475 | cordinyana | public Object getWindowProfile() { |
85 | return WindowInfo.TOOL_PROFILE;
|
||
86 | } |
||
87 | 7571 | caballero | |
88 | 7304 | caballero | } |