root / branches / v10 / extensions / extI18n / src / org / gvsig / i18n / extension / I18nExtension.java @ 25963
History | View | Annotate | Download (2.21 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Gobernment (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 |
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2008 {DiSiD Technologies} {New extension for installation and update of text translations}
|
26 |
*/
|
27 |
package org.gvsig.i18n.extension; |
28 |
|
29 |
import java.net.URL; |
30 |
|
31 |
import org.gvsig.i18n.extension.preferences.I18nPreferencePage; |
32 |
|
33 |
import com.iver.andami.PluginServices; |
34 |
import com.iver.andami.plugins.Extension; |
35 |
import com.iver.cit.gvsig.About; |
36 |
import com.iver.cit.gvsig.gui.panels.FPanelAbout; |
37 |
import com.iver.utiles.extensionPoints.ExtensionPointsSingleton; |
38 |
|
39 |
/**
|
40 |
* Texts localization management extension.
|
41 |
*
|
42 |
* @author <a href="mailto:dcervera@disid.com">David Cervera</a>
|
43 |
*/
|
44 |
public class I18nExtension extends Extension { |
45 |
|
46 |
public void execute(String actionCommand) { |
47 |
// Nothing to do
|
48 |
} |
49 |
|
50 |
public void initialize() { |
51 |
// Replace the default locale Preferences page for the new one
|
52 |
ExtensionPointsSingleton.getInstance().add("AplicationPreferences",
|
53 |
"LanguagePage", new I18nPreferencePage()); |
54 |
} |
55 |
|
56 |
public void postInitialize() { |
57 |
// Register the about panel
|
58 |
About about = (About) PluginServices.getExtension(About.class); |
59 |
FPanelAbout panelAbout = about.getAboutPanel(); |
60 |
URL aboutURL = getClass().getResource("/about.htm"); |
61 |
panelAbout.addAboutUrl("I18nExtension", aboutURL);
|
62 |
} |
63 |
|
64 |
public boolean isEnabled() { |
65 |
return true; |
66 |
} |
67 |
|
68 |
public boolean isVisible() { |
69 |
return true; |
70 |
} |
71 |
} |