Class IconFactory

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

public class IconFactory extends Object
A factory for standard JT Harness icons. Note: some of this code is based upon the Swing icon factory for the "metal" look and feel.
  • Field Details

  • Constructor Details

    • IconFactory

      public IconFactory()
  • Method Details

    • getFileIcon

      public static Icon getFileIcon()
      Get an icon for a file.
      Returns:
      an icon for afile
    • getReportIcon

      public static Icon getReportIcon()
      Get an icon for a file.
      Returns:
      an icon for a report
    • getFolderIcon

      public static Icon getFolderIcon()
      Get an icon for a folder.
      Returns:
      an icon for a folder
    • getUpFolderIcon

      public static Icon getUpFolderIcon()
      Get an icon for a parent folder.
      Returns:
      an icon for a parent folder
    • getOpenableFolderIcon

      public static Icon getOpenableFolderIcon()
      Get an icon for an openable (traversable) folder.
      Returns:
      an icon for an openable (traversable) folder
    • getSelectableFolderIcon

      public static Icon getSelectableFolderIcon()
      Get an icon for an selectable (non-traversable) folder.
      Returns:
      an icon for an selectable (non-traversable) folder
    • getTestIcon

      public static Icon getTestIcon(int state, boolean active, boolean glyph)
      Get a test icon.
      Parameters:
      state - the state for this test: one of PASSED, FAILED, ERROR, NOT_RUN, FILTERED_OUT
      active - whether the icon should indicate current activity or not
      glyph - whether the icon should contain an accessibility glyph or not
      Returns:
      a test icon appropriate to the arguments
    • getTestFolderIcon

      public static Icon getTestFolderIcon(int state, boolean active, boolean glyph)
      Get a test folder icon.
      Parameters:
      state - the state for this test: one of PASSED, FAILED, ERROR, NOT_RUN, FILTERED_OUT
      active - whether the icon should indicate current activity or not
      glyph - whether the icon should contain an accessibility glyph or not
      Returns:
      a test folder icon appropriate to the arguments
    • getTestSectionIcon

      public static Icon getTestSectionIcon(int state)
      Get a test section icon.
      Parameters:
      state - the state for this test: one of PASSED, FAILED, ERROR, NOT_RUN, FILTERED_OUT
      Returns:
      a test section icon appropriate to the arguments