Class Msg

java.lang.Object
se.datadosen.jalbum.Msg

public class Msg extends Object
Repository for internationalized strings
  • Field Details

    • lastCallerPackage

      protected static Package lastCallerPackage
    • temporaryBundle

      protected static SmartResourceBundle temporaryBundle
    • toTranslate

      protected static Set toTranslate
    • debugMode

      protected static boolean debugMode
  • Method Details

    • getResourceBundle

      public static SmartResourceBundle getResourceBundle()
    • reloadBundle

      public static void reloadBundle()
      Reload resource bundle, for example after a change of language
    • getString

      @Deprecated public static String getString(String key)
      Deprecated.
    • isTranslated

      public static boolean isTranslated(String key)
    • get

      public static String get(String key)
    • getShortcut

      public static String getShortcut(String key)
    • isPresent

      public static boolean isPresent(String key)
    • getLocale

      public static Locale getLocale()
    • get

      public static String get(String key, Object... params)
    • get

      public static String get(Class caller, String key, Object... params)
      Parameters:
      caller -
      key -
      params -
      Returns:
      Since:
      18.3
    • get

      public static String get(Class caller, String key)
      Parameters:
      caller -
      key -
      Returns:
      Since:
      18.3
    • getString

      public static String getString(Object caller, String key, Object... params)
    • getString

      public static String getString(Object caller, String key)
    • maintainTranslated

      public static void maintainTranslated(Object o)
      Register object for translation with setTexts() and set texts initially
      Parameters:
      o - object having fields annotated with @Text or @ToolTipText
    • releaseFromTranslation

      public static void releaseFromTranslation(Object o)
      Remove object from translation with setTexts()
      Parameters:
      o - object having fields annotated with @Text or @ToolTipText
    • setTexts

      public static void setTexts()
      Traverse all objects registered to be translated and pass them to the setTexts method of this class
    • setTexts

      public static void setTexts(Object o)
      Traverse though fields declared within passed object and for each Action field annotated with @Text or set the corresponding name or tool tip
      Parameters:
      o -
    • setIcons

      public static void setIcons(Object o)
      Traverse though fields declared within passed object and for each Action field annotated with @Icon, set the corresponding icon
      Parameters:
      o -