Class I18nViewUtil

java.lang.Object
com.jsql.view.swing.util.I18nViewUtil

public class I18nViewUtil extends Object
  • Method Details

    • keys

      public static Set<String> keys()
      Return the i18n keys of components whose text is replaced when the translation changes.
      Returns:
      a set of key names of a i18n key in the properties
    • componentsByKey

      public static List<Object> componentsByKey(String key)
      Get a list of graphical components whose text corresponds to the i18n key in the properties.
      Parameters:
      key - name of a i18n key in the properties
      Returns:
      a list of graphical components
    • addComponentForKey

      public static void addComponentForKey(String key, Object component)
      Add a graphical component to those whose text must be changed when the language changes.
      Parameters:
      key - name of a i18n key in the properties
      component - graphical component which will receive the translated text
    • valueByKey

      public static String valueByKey(String key)
      Return the text corresponding to a i18n key in the properties.
      Parameters:
      key - a i18n key in the properties
      Returns:
      text corresponding to the key
    • valueByKey

      public static String valueByKey(String key, Locale newLocale)