Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / extensions / extI18n / src / main / java / org / gvsig / i18n / extension / I18nExtension.java @ 29635

History | View | Annotate | Download (2.3 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.andami.PluginServices;
32
import org.gvsig.andami.plugins.Extension;
33
import org.gvsig.app.extension.About;
34
import org.gvsig.app.gui.panels.FPanelAbout;
35
import org.gvsig.i18n.extension.preferences.I18nPreferencePage;
36
import org.gvsig.tools.ToolsLocator;
37

    
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
        ToolsLocator.getExtensionPointManager()
53
                .add("AplicationPreferences", "").append("LanguagePage", "",
54
                        new I18nPreferencePage());
55
    }
56

    
57
    public void postInitialize() {
58
        // Register the about panel
59
        About about = (About) PluginServices.getExtension(About.class);
60
        FPanelAbout panelAbout = about.getAboutPanel();
61
        URL aboutURL = getClass().getResource("/about.htm");
62
        panelAbout.addAboutUrl("I18nExtension", aboutURL);
63
    }
64

    
65
    public boolean isEnabled() {
66
        return true;
67
    }
68

    
69
    public boolean isVisible() {
70
        return true;
71
    }
72
}