@@ -0,0 +1,2174 @@
+package cologne.eck.peafactory.gui;%0A%0A/*%0A * Peafactory - Production of Password Encryption Archives%0A * Copyright (C) 2015  Axel von dem Bruch%0A * %0A * This library is free software; you can redistribute it and/or modify it %0A * under the terms of the GNU General Public License as published %0A * by the Free Software Foundation; either version 2 of the License, %0A * or (at your option) any later version.%0A * This library is distributed in the hope that it will be useful, but %0A * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY %0A * or FITNESS FOR A PARTICULAR PURPOSE. %0A * See the GNU General Public License for more details.%0A * See:  http://www.gnu.org/licenses/gpl-2.0.html%0A * You should have received a copy of the GNU General Public License %0A * along with this library.%0A */%0A%0A/**%0A * Language support for PeaFactory, not for peas.%0A */%0A%0Aimport java.awt.*;%0Aimport java.awt.event.ActionEvent;%0Aimport java.awt.event.ActionListener;%0A%0Aimport javax.swing.JComboBox;%0Aimport javax.swing.JSeparator;%0A%0Aimport cologne.eck.peafactory.PeaFactory;%0A%0A%0A@SuppressWarnings(%7B %22rawtypes%22, %22serial%22 %7D)%0Apublic class LanguageMenu extends JComboBox implements ActionListener %7B%0A%09%0A%09@SuppressWarnings(%22unchecked%22)%0A%09public LanguageMenu() %7B%0A%09%0A%09%09final String%5B%5D languageStrings = %7B %22de%22, %22en%22 %7D;%0A%09%09%0A%09%09//set default language first%0A%09%09this.insertItemAt(PeaFactory.getLanguage(), 0);%0A%09%09int index = 1;%0A%09%09for (int i = 0; i %3C languageStrings.length; i++) %7B%0A%09%09%09if (! PeaFactory.getLanguage().equals(languageStrings%5Bi%5D) ) %7B%0A%09%09%09%09this.insertItemAt(languageStrings%5Bi%5D, index++);%0A%09%09%09%09this.add(new JSeparator());%0A%09%09%09%7D%0A%09%09%7D%0A%09%09this.addActionListener(this);%0A%09%09this.setActionCommand(%22language%22);%0A%09%09%0A%09%09this.setPreferredSize(new Dimension(20, 30));%0A%09%09this.setMaximumSize(new Dimension(20, 30));%0A%09%09this.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 11));%0A%09%09this.setBackground(Color.WHITE);%0A%09%7D%0A%09%0A%0A%09@Override%0A%09public void actionPerformed(ActionEvent ape) %7B%0A%09%09String com = ape.getActionCommand();%0A%09%09if ( com.equals(%22language%22)) %7B%0A%0A%09%09%09JComboBox cb = (JComboBox)ape.getSource();%0A%09        String selectedLanguage = (String)cb.getSelectedItem();%0A%09        %0A%09        PeaFactory.setI18n(selectedLanguage);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Create LanguageMenu.java