Class LanguageDialog.Panel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, ActionMap
Enclosing class:
LanguageDialog

public static class LanguageDialog.Panel extends JPanel implements ActionMap
The language selection panel.
See Also:
  • Field Details

    • userList

      protected JList userList
      The user languages list
    • languageList

      protected JList languageList
      The languages list
    • userListModel

      protected DefaultListModel userListModel
      The user list model
    • languageListModel

      protected DefaultListModel languageListModel
      The language list model
    • addLanguageButton

      protected JButton addLanguageButton
      The AddLanguageButton.
    • removeLanguageButton

      protected JButton removeLanguageButton
      The RemoveLanguageButton.
    • upLanguageButton

      protected JButton upLanguageButton
      The UpLanguageButton.
    • downLanguageButton

      protected JButton downLanguageButton
      The DownLanguageButton.
    • clearLanguageButton

      protected JButton clearLanguageButton
      The ClearLanguageButton.
    • listeners

      protected Map listeners
      The map that contains the listeners
    • iconMap

      private static Map iconMap
      The cached map for country icons (takes more than 2 secs. to be computed).
  • Constructor Details

    • Panel

      public Panel()
      Creates a new Panel object.
  • Method Details

    • initCountryIcons

      public static void initCountryIcons()
      Allows to pre-initialize icons used by the Panel constructor. It is not neccessary to call it and it should be called only once. This method is safe to be called by another thread than the event thread as it doesn't manipulate Swing JComponent instances.
    • getLanguages

      public String getLanguages()
      Returns the selected user languages.
    • setLanguages

      public void setLanguages(String str)
      Sets the user languages.
    • updateButtons

      protected void updateButtons()
      Updates the state of the buttons
    • getCountryText

      protected String getCountryText(String code)
      returns the full string associated with a country code.
    • getCountryIcon

      protected Icon getCountryIcon(String code)
      returns the icon associated with a country code.
    • computeCountryIcon

      private static Icon computeCountryIcon(Class ref, String code)
    • getAction

      public Action getAction(String key) throws MissingListenerException
      Returns the action associated with the given string or null on error
      Specified by:
      getAction in interface ActionMap
      Parameters:
      key - the key mapped with the action to get
      Throws:
      MissingListenerException - if the action is not found