svn-gvsig-desktop / tags / v1_1_Build_1009 / applications / appgvSIG / src / com / iver / cit / gvsig / About.java @ 12649
History | View | Annotate | Download (3.85 KB)
1 |
/*
|
---|---|
2 |
* Created on 17-feb-2004
|
3 |
*
|
4 |
* To change the template for this generated file go to
|
5 |
* Window>Preferences>Java>Code Generation>Code and Comments
|
6 |
*/
|
7 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
8 |
*
|
9 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
10 |
*
|
11 |
* This program is free software; you can redistribute it and/or
|
12 |
* modify it under the terms of the GNU General Public License
|
13 |
* as published by the Free Software Foundation; either version 2
|
14 |
* of the License, or (at your option) any later version.
|
15 |
*
|
16 |
* This program is distributed in the hope that it will be useful,
|
17 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
18 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
19 |
* GNU General Public License for more details.
|
20 |
*
|
21 |
* You should have received a copy of the GNU General Public License
|
22 |
* along with this program; if not, write to the Free Software
|
23 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
24 |
*
|
25 |
* For more information, contact:
|
26 |
*
|
27 |
* Generalitat Valenciana
|
28 |
* Conselleria d'Infraestructures i Transport
|
29 |
* Av. Blasco Ib??ez, 50
|
30 |
* 46010 VALENCIA
|
31 |
* SPAIN
|
32 |
*
|
33 |
* +34 963862235
|
34 |
* gvsig@gva.es
|
35 |
* www.gvsig.gva.es
|
36 |
*
|
37 |
* or
|
38 |
*
|
39 |
* IVER T.I. S.A
|
40 |
* Salamanca 50
|
41 |
* 46005 Valencia
|
42 |
* Spain
|
43 |
*
|
44 |
* +34 963163400
|
45 |
* dac@iver.es
|
46 |
*/
|
47 |
package com.iver.cit.gvsig; |
48 |
|
49 |
import com.iver.andami.PluginServices; |
50 |
import com.iver.andami.plugins.Extension; |
51 |
import com.iver.cit.gvsig.gui.panels.FPanelAbout; |
52 |
|
53 |
|
54 |
/**
|
55 |
* Extensi?n que abre una nueva ventana mostrando la informaci?n sobre el
|
56 |
* gvSIG.
|
57 |
*
|
58 |
* @author Francisco Jos? Pe?arrubia
|
59 |
*/
|
60 |
public class About extends Extension { |
61 |
private static FPanelAbout panelAbout = new FPanelAbout(); |
62 |
/**
|
63 |
* @see com.iver.andami.plugins.IExtension#isEnabled()
|
64 |
*/
|
65 |
public boolean isEnabled() { |
66 |
return true; |
67 |
} |
68 |
|
69 |
/**
|
70 |
* @see com.iver.mdiApp.plugins.IExtension#isVisible()
|
71 |
*/
|
72 |
public boolean isVisible() { |
73 |
return true; |
74 |
} |
75 |
|
76 |
/**
|
77 |
* @see com.iver.andami.plugins.IExtension#initialize()
|
78 |
*/
|
79 |
public void initialize() { |
80 |
java.net.URL aboutURL = About.class.getResource( |
81 |
"/about.htm");
|
82 |
panelAbout.addAboutUrl("gvSIG",aboutURL);
|
83 |
|
84 |
// EXAMPLE TO MAKE USE OF ABOUT WINDOW FROM AN EXTERNAL
|
85 |
// EXTENSION
|
86 |
/* About claseAbout = (About) PluginServices.getExtension(com.iver.cit.gvsig.About.class);
|
87 |
java.net.URL aboutURL2 = About.class.getResource(
|
88 |
"/about.htm");
|
89 |
|
90 |
claseAbout.getAboutPanel().addAboutUrl("NewExtensionName", aboutURL2); */
|
91 |
|
92 |
|
93 |
} |
94 |
|
95 |
/**
|
96 |
* @see com.iver.andami.plugins.IExtension#execute(java.lang.String)
|
97 |
*/
|
98 |
public void execute(String actionCommand) { |
99 |
PluginServices.getMDIManager().addWindow(panelAbout); |
100 |
/*
|
101 |
* Ejemplo de c?mo crear una ventana para hacer paletas.
|
102 |
* Cuando tenga tiempo, hay que hacerlo con Andami para
|
103 |
* que Andami no dependa de los JInternalFrame, y alg?n
|
104 |
* d?a (si hace falta) se cambie.
|
105 |
*
|
106 |
* JInternalFrame panel = new JInternalFrame();
|
107 |
panel.setClosable(true);
|
108 |
panel.setSize(200,200);
|
109 |
panel.setTitle("Hola");
|
110 |
|
111 |
MDIFrame mainFrame = (MDIFrame) PluginServices.getMainFrame();
|
112 |
JLayeredPane lyrPane = mainFrame.getLayeredPane();
|
113 |
lyrPane.add(panel, JDesktopPane.PALETTE_LAYER);
|
114 |
panel.show(); */
|
115 |
} |
116 |
|
117 |
/**
|
118 |
* An external plugin must call this method to obtain
|
119 |
* the AboutPanel and add its own about.
|
120 |
* Example:
|
121 |
* In initialize, call PluginServices.getExtension and
|
122 |
* cast it to About class.
|
123 |
* Then, call getAboutPanel, and addAboutUrl
|
124 |
* PluginServices.getExtension(com.iver.cit.gvsig.About);
|
125 |
* See the initalize method inside this extension
|
126 |
* @return the About Panel
|
127 |
*/
|
128 |
public FPanelAbout getAboutPanel()
|
129 |
{ |
130 |
return panelAbout;
|
131 |
} |
132 |
} |