Class I18NUtils

java.lang.Object
com.sun.javatest.tool.I18NUtils

public class I18NUtils extends Object
Utility class to get general internationalization properties and perform general transformations.
  • Field Details

  • Constructor Details

    • I18NUtils

      public I18NUtils()
  • Method Details

    • getStatusColor

      public static Color getStatusColor(int status)
      Get the base color for a test status.
      Parameters:
      status - the status for which the color is required: one of PASSED, FAILED, ERROR, NOT_RUN
      Returns:
      the base color for the specified test status
    • getStatusBarColor

      public static Color getStatusBarColor(int status)
      Get the color for a bar for a test status.
      Parameters:
      status - the status for which the color is required: one of PASSED, FAILED, ERROR, NOT_RUN
      Returns:
      the color for a bar for the specified test status
    • getStatusString

      public static String getStatusString(int status)
      Get the localized status string for a particular test status.
      Parameters:
      status - the status for which the color is required: one of PASSED, FAILED, ERROR, NOT_RUN
      Returns:
      the color for a bar for the specified test status
      See Also:
    • getStatusMessage

      public static String getStatusMessage(Status status)
      Get localized version of the message string. This includes a localized version of the status (e.g. "Passed") and the raw status message.
      Parameters:
      status - The status object for format. May not be null.
      Returns:
      A formatted, internationalized string representation of the status object (state and reason).
      See Also:
    • lighter

      public static Color lighter(Color c)
      Create a color derived from the given color, but lighter. This is currently done by decreasing it's saturation and brightness.
      Parameters:
      c - The color to lighten.
      Returns:
      The derived color.