Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.javatest.tool
Class IconFactory

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

    public class IconFactory

extends java.lang.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 Summary
`static int` | `ERROR` A convenience redefinition of `Status.ERROR`.
`static int` | `FAILED` A convenience redefinition of `Status.FAILED`.
`static int` | `FILTERED_OUT` A constant indicating that as icon should be represented as "filtered out".
`static int` | `NOT_RUN` A convenience redefinition of `Status.NOT_RUN`.
`static int` | `NUM_STATES` A constant indicating the number of different value "state" values.
`static int` | `PASSED` A convenience redefinition of `Status.PASSED`.

Constructor Summary
`IconFactory()`

Method Summary
`static javax.swing.Icon` | `getFileIcon()` Get an icon for a file.
`static javax.swing.Icon` | `getFolderIcon()` Get an icon for a folder.
`static javax.swing.Icon` | `getOpenableFolderIcon()` Get an icon for an openable (traversable) folder.
`static javax.swing.Icon` | `getReportIcon()` Get an icon for a file.
`static javax.swing.Icon` | `getSelectableFolderIcon()` Get an icon for an selectable (non-traversable) folder.
`static javax.swing.Icon` | `getTestFolderIcon(int state, boolean active, boolean glyph)` Get a test folder icon.
`static javax.swing.Icon` | `getTestIcon(int state, boolean active, boolean glyph)` Get a test icon.
`static javax.swing.Icon` | `getTestSectionIcon(int state)` Get a test section icon.
`static javax.swing.Icon` | `getUpFolderIcon()` Get an icon for a parent folder.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PASSED

    public static final int PASSED

  A convenience redefinition of `Status.PASSED`.

  See Also:
    Constant Field Values

### FAILED

    public static final int FAILED

  A convenience redefinition of `Status.FAILED`.

  See Also:
    Constant Field Values

### ERROR

    public static final int ERROR

  A convenience redefinition of `Status.ERROR`.

  See Also:
    Constant Field Values

### NOT_RUN

    public static final int NOT_RUN

  A convenience redefinition of `Status.NOT_RUN`.

  See Also:
    Constant Field Values

### FILTERED_OUT

    public static final int FILTERED_OUT

  A constant indicating that as icon should be represented as "filtered out".

  See Also:
    Constant Field Values

### NUM_STATES

    public static final int NUM_STATES

  A constant indicating the number of different value "state" values.

  See Also:
    Constant Field Values

Constructor Detail

### IconFactory

    public IconFactory()

Method Detail

### getFileIcon

    public static javax.swing.Icon getFileIcon()

  Get an icon for a file.

  Returns:
    an icon for afile

### getReportIcon

    public static javax.swing.Icon getReportIcon()

  Get an icon for a file.

  Returns:
    an icon for a report

### getFolderIcon

    public static javax.swing.Icon getFolderIcon()

  Get an icon for a folder.

  Returns:
    an icon for a folder

### getUpFolderIcon

    public static javax.swing.Icon getUpFolderIcon()

  Get an icon for a parent folder.

  Returns:
    an icon for a parent folder

### getOpenableFolderIcon

    public static javax.swing.Icon getOpenableFolderIcon()

  Get an icon for an openable (traversable) folder.

  Returns:
    an icon for an openable (traversable) folder

### getSelectableFolderIcon

    public static javax.swing.Icon getSelectableFolderIcon()

  Get an icon for an selectable (non-traversable) folder.

  Returns:
    an icon for an selectable (non-traversable) folder

### getTestIcon

    public static javax.swing.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 javax.swing.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 javax.swing.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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.