Class UIFactory.UIFactoryExt

java.lang.Object
com.sun.javatest.tool.UIFactory
com.sun.javatest.tool.UIFactory.UIFactoryExt
Enclosing class:
UIFactory

public static class UIFactory.UIFactoryExt extends UIFactory
Extension to the UIFactory that allows to use more than one resource bundle. All methods accessing the resource bundle are overridden to search for a resource in the alternative bundle first, and, if not found, look up it in the original one. This class might be helpful, when a component extends another components from a different package.
  • Constructor Details

    • UIFactoryExt

      public UIFactoryExt(UIFactory uif, Class<?> altClass)
  • Method Details

    • getI18NColor

      public Color getI18NColor(String key)
      Description copied from class: UIFactory
      Get a color from the resource bundle.
      Overrides:
      getI18NColor in class UIFactory
      Parameters:
      key - the base name of the resource to be returned
      Returns:
      the color identified in the resource
    • getI18NString

      public String getI18NString(String key)
      Description copied from class: UIFactory
      Get a string from the resource bundle.
      Overrides:
      getI18NString in class UIFactory
      Parameters:
      key - the name of the resource to be returned
      Returns:
      the string that was found
    • getI18NString

      public String getI18NString(String key, Object arg)
      Description copied from class: UIFactory
      Get a string from the resource bundle.
      Overrides:
      getI18NString in class UIFactory
      Parameters:
      key - the name of the resource to be returned
      arg - an argument to be formatted into the result using MessageFormat.format(Object[], StringBuffer, FieldPosition)
      Returns:
      the formatted string
    • getI18NString

      public String getI18NString(String key, Object... args)
      Description copied from class: UIFactory
      Get a string from the resource bundle.
      Overrides:
      getI18NString in class UIFactory
      Parameters:
      key - the name of the resource to be returned
      args - an array of arguments to be formatted into the result using MessageFormat.format(Object[], StringBuffer, FieldPosition)
      Returns:
      the formatted string
    • getIconURL

      public URL getIconURL(String uiKey)
      Description copied from class: UIFactory
      Get the resource URL for an icon specified in a resource bundle.
      The resource used is:
      uiKey.icon the name of a resource containing the image
      Overrides:
      getIconURL in class UIFactory
      Parameters:
      uiKey - the base name of the resource to be used
      Returns:
      the URL for the resource obtained from the resource bundle