01: package net.sourceforge.squirrel_sql.plugins.i18n;
02:
03: import net.sourceforge.squirrel_sql.fw.util.StringManager;
04: import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
05: import net.sourceforge.squirrel_sql.client.plugin.PluginResources;
06: import net.sourceforge.squirrel_sql.client.resources.SquirrelResources;
07:
08: import javax.swing.*;
09: import java.awt.*;
10:
11: public class I18nPanel extends JPanel {
12: private static final StringManager s_stringMgr = StringManagerFactory
13: .getStringManager(I18nPanel.class);
14:
15: TranslatorsPanel pnlTranslators;
16: DevelopersPanel pnlDevelopers;
17:
18: JTabbedPane tabI18n = new JTabbedPane();
19:
20: JTextField txtNote;
21:
22: public I18nPanel(PluginResources resources) {
23: pnlTranslators = new TranslatorsPanel(resources);
24: pnlDevelopers = new DevelopersPanel(resources);
25:
26: GridBagConstraints gbc;
27:
28: // i18n[I18n.translators=Translators]
29: tabI18n.add(s_stringMgr.getString("I18n.translators"),
30: pnlTranslators);
31: // i18n[I18n.developers=Developers]
32: tabI18n.add(s_stringMgr.getString("I18n.developers"),
33: pnlDevelopers);
34:
35: setLayout(new GridBagLayout());
36: gbc = new GridBagConstraints(0, 0, 1, 1, 1, 1,
37: GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
38: new Insets(5, 0, 0, 5), 0, 0);
39: add(tabI18n, gbc);
40:
41: txtNote = new JTextField();
42: txtNote.setText(s_stringMgr
43: .getString("I18n.changeApplicationDefaultLocaleNote"));
44: txtNote.setEditable(false);
45: // i18n[I18n.changeApplicationDefaultLocaleNote=Example VM Parameters to change locale used by SQuirreL: -Duser.language=en -Duser.country=US]
46: gbc = new GridBagConstraints(0, 1, 1, 1, 0, 0,
47: GridBagConstraints.NORTHWEST,
48: GridBagConstraints.HORIZONTAL, new Insets(5, 5, 0, 5),
49: 0, 0);
50: add(txtNote, gbc);
51: }
52: }
|