Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package jaxx.runtime.swing.editor;
/*-
* #%L
* JAXX :: Widgets
* %%
* Copyright (C) 2008 - 2017 CodeLutin
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.LayoutManager;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import javax.swing.JToggleButton;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.PopupMenuEvent;
import javax.swing.event.PopupMenuListener;
import jaxx.runtime.JAXXBinding;
import jaxx.runtime.JAXXContext;
import jaxx.runtime.JAXXObject;
import jaxx.runtime.JAXXObjectDescriptor;
import jaxx.runtime.JAXXUtil;
import jaxx.runtime.SwingUtil;
import jaxx.runtime.binding.DefaultJAXXBinding;
import jaxx.runtime.binding.SimpleJAXXObjectBinding;
import jaxx.runtime.context.DefaultJAXXContext;
import jaxx.runtime.swing.JAXXButtonGroup;
import jaxx.runtime.swing.renderer.LocaleListCellRenderer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import static org.nuiton.i18n.I18n.n;
import static org.nuiton.i18n.I18n.t;
public class I18nEditor extends JPanel implements PropertyChangeListener, ActionListener, JAXXObject {
/*-----------------------------------------------------------------------*/
/*---------------- Constants for all javaBean properties ----------------*/
/*-----------------------------------------------------------------------*/
public static final String PROPERTY_LOCALES = "locales";
public static final String PROPERTY_NOT_SELECTED_TOOL_TIP_TEXT = "notSelectedToolTipText";
public static final String PROPERTY_POPUP_BORDER = "popupBorder";
public static final String PROPERTY_POPUP_VISIBLE = "popupVisible";
public static final String PROPERTY_RENDERER = "renderer";
public static final String PROPERTY_SELECTED_LOCALE = "selectedLocale";
public static final String PROPERTY_SELECTED_TOOL_TIP_TEXT = "selectedToolTipText";
public static final String PROPERTY_SHOW_ICON = "showIcon";
public static final String PROPERTY_SHOW_POPUP_ICON = "showPopupIcon";
public static final String PROPERTY_SHOW_POPUP_TEXT = "showPopupText";
public static final String PROPERTY_SHOW_TEXT = "showText";
/*-----------------------------------------------------------------------*/
/*------------------ Constants for all public bindings ------------------*/
/*-----------------------------------------------------------------------*/
public static final String BINDING_BUTTON_ICON = "button.icon";
public static final String BINDING_BUTTON_SELECTED = "button.selected";
public static final String BINDING_BUTTON_TEXT = "button.text";
public static final String BINDING_BUTTON_TOOL_TIP_TEXT = "button.toolTipText";
public static final String BINDING_POPUP_BORDER = "popup.border";
public static final String BINDING_RENDERER_SHOW_ICON = "renderer.showIcon";
public static final String BINDING_RENDERER_SHOW_TEXT = "renderer.showText";
/*-----------------------------------------------------------------------*/
/*------------------------- Other static fields -------------------------*/
/*-----------------------------------------------------------------------*/
private static final String $jaxxObjectDescriptor = "H4sIAAAAAAAAAKVVz08TQRSeVtrSHyCVSCBigujFYLaRkwkEkWIFUpRAYwg96LQ7tkuGnXFnVpaL8U/wT9C7FxNvnowHzx68GP8FYzx4Nb6Z3e22sNbG9tBu34/vfe+9mW/ffEcp4aArh9jzDMe1pXVEjK07+/sPGoekKdeJaDoWl8xB/ieRRMk6ypsdu5Doar2q0ktBeqnMjjizid2VvVRFOSFPKBFtQqREl3szmkKU9jruJY+7TojaIRWH+urnj+RL88XrJEIeB3ZFaGXuX1lRJyNVlLRMiS5ApWe4RLHdAhqOZbeA75iylSkW4j4+Ik/Rc5SpojTHDoBJND94yxpD53tcokyT2VJDXOshKo6hrEFMC1KNzZu37Lv6kXOdmobENrZNShyJFgZJ3PCjo/xJQShslJg1xmjN4jXiAYkJ1aWhOjf8zqOEKZvJvbM5yluMovKccZevMcdU1GYUnBdwamij4fuijFHRZsd+9WJUfQ0qEGyfCtuEaan/M5F9TNl3VNGQTawzJrOgqT60hNWg5JQvQ1kTw/mTaFxzcqVFjaolZBQyHg6wqkPD2fmR2tRFHk4JNK1GshizrdAb5Kk6ZULpbmBWINkOVkrThn10z3ZLN7lNbDcqmtOBVdwgFM50T7Q2qrCFTnS64UoJZ7F3Z1s11mpRsqZ9vTwyFrDz1IjmY1pSmuFn3XMYkOJwFS/1xMElN6JLHt3CRB2lHFfPfrp+Vhd2weUrwvQpRVCA2vt7avLL+2/vKqEMFKD2xdjQLhWD68kdxmFFlip93tcAtc3SNuZLdZT1960lbjaG2F7gBnJQrxgdhg0s2gCRynz98HHq8edzKFlBOcqwWcEqfhNlZduBKTBqevz2qmZUOB6F7wnFDVZD8QmDWaLxZRNLPNeAycOMVzwYwmzMEDpMGtlPvyb33q6Gg0gAsZm/hkfDSB2gtGVTyyZaEQOxi1XAPBfENVkkanEyl1C/OR4czWX9vRrXac8lL3uu+lnXxNVTReNcHxQn1IMhcNK+ZvVBuTEASobYGCRGvVmW/bHOYQnqCjeOrMTDlgaAHZFBgwf/j1F4wpqu2MEWvITMPliLA2BlNRYOxHQIoBGr/wkYBGM0VOehcJT50ZBM8rL3ZdkH6g8SOKddfgkAAA==";
private static final Log log = LogFactory.getLog(I18nEditor.class);
private static final long serialVersionUID = 1L;
/*-----------------------------------------------------------------------*/
/*--------------------------- Internal states ---------------------------*/
/*-----------------------------------------------------------------------*/
protected List