Class Messages

java.lang.Object
megamek.client.ui.Messages

public class Messages extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    Returns the formatted internationalized text for the given key in the resource bundle, replacing occurrences of %s in the message with the contents of args.
    static String
    Returns the internationalized text for the given key in the resource bundle.
    static String
    getString(String key, Object... args)
    Returns the formatted internationalized text for the given key in the resource bundle, replacing occurrences of {x} in the message with the contents of args.
    static boolean
    Check to see if a given key has valid internationalized text.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • keyExists

      public static boolean keyExists(String key)
      Check to see if a given key has valid internationalized text.
    • getString

      public static String getString(String key)
      Returns the internationalized text for the given key in the resource bundle.
    • getString

      public static String getString(String key, Object... args)
      Returns the formatted internationalized text for the given key in the resource bundle, replacing occurrences of {x} in the message with the contents of args.
    • getFormattedString

      public static String getFormattedString(String key, Object... args)
      Returns the formatted internationalized text for the given key in the resource bundle, replacing occurrences of %s in the message with the contents of args.

      This is ONLY to be used for string that need to be formatted without formatting the number