Make I18n class non-static.
[jkeytool.git] / src / net / pterodactylus / util / i18n / gui / I18nMenu.java
index 993be97..e47ec1c 100644 (file)
@@ -26,7 +26,7 @@ import net.pterodactylus.util.i18n.I18nable;
 
 /**
  * Menu that receives its properties from {@link I18n}.
- * 
+ *
  * @author David ‘Bombe’ Roden <bombe@freenetproject.org>
  */
 public class I18nMenu extends JMenu implements I18nable {
@@ -36,13 +36,15 @@ public class I18nMenu extends JMenu implements I18nable {
 
        /**
         * Creates a new menu with the given {@link I18n} basename.
-        * 
+        *
+        * @param i18n
+        *            The I18n container
         * @param i18nBasename
         *            The basename of the {@link I18n} properties
         */
-       public I18nMenu(String i18nBasename) {
+       public I18nMenu(I18n i18n, String i18nBasename) {
                this.i18nBasename = i18nBasename;
-               updateI18n();
+               updateI18n(i18n);
        }
 
        //
@@ -52,9 +54,9 @@ public class I18nMenu extends JMenu implements I18nable {
        /**
         * {@inheritDoc}
         */
-       public void updateI18n() {
-               setText(I18n.get(i18nBasename + ".name"));
-               setMnemonic(I18n.getKey(i18nBasename + ".mnemonic"));
+       public void updateI18n(I18n i18n) {
+               setText(i18n.get(i18nBasename + ".name"));
+               setMnemonic(i18n.getKey(i18nBasename + ".mnemonic"));
        }
 
 }