Package com.sun.javatest.tool
Class IconFactory
java.lang.Object
com.sun.javatest.tool.IconFactory
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
FieldsModifier and TypeFieldDescriptionstatic final int
A convenience redefinition ofStatus.ERROR
.static final int
A convenience redefinition ofStatus.FAILED
.static final int
A constant indicating that as icon should be represented as "filtered out".static final int
A convenience redefinition ofStatus.NOT_RUN
.static final int
A constant indicating the number of different value "state" values.static final int
A convenience redefinition ofStatus.PASSED
. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Icon
Get an icon for a file.static Icon
Get an icon for a folder.static Icon
Get an icon for an openable (traversable) folder.static Icon
Get an icon for a file.static Icon
Get an icon for an selectable (non-traversable) folder.static Icon
getTestFolderIcon
(int state, boolean active, boolean glyph) Get a test folder icon.static Icon
getTestIcon
(int state, boolean active, boolean glyph) Get a test icon.static Icon
getTestSectionIcon
(int state) Get a test section icon.static Icon
Get an icon for a parent folder.
-
Field Details
-
PASSED
public static final int PASSEDA convenience redefinition ofStatus.PASSED
.- See Also:
-
FAILED
public static final int FAILEDA convenience redefinition ofStatus.FAILED
.- See Also:
-
ERROR
public static final int ERRORA convenience redefinition ofStatus.ERROR
.- See Also:
-
NOT_RUN
public static final int NOT_RUNA convenience redefinition ofStatus.NOT_RUN
.- See Also:
-
FILTERED_OUT
public static final int FILTERED_OUTA constant indicating that as icon should be represented as "filtered out".- See Also:
-
NUM_STATES
public static final int NUM_STATESA constant indicating the number of different value "state" values.- See Also:
-
-
Constructor Details
-
IconFactory
public IconFactory()
-
-
Method Details
-
getFileIcon
Get an icon for a file.- Returns:
- an icon for afile
-
getReportIcon
Get an icon for a file.- Returns:
- an icon for a report
-
getFolderIcon
Get an icon for a folder.- Returns:
- an icon for a folder
-
getUpFolderIcon
Get an icon for a parent folder.- Returns:
- an icon for a parent folder
-
getOpenableFolderIcon
Get an icon for an openable (traversable) folder.- Returns:
- an icon for an openable (traversable) folder
-
getSelectableFolderIcon
Get an icon for an selectable (non-traversable) folder.- Returns:
- an icon for an selectable (non-traversable) folder
-
getTestIcon
Get a test icon.- Parameters:
state
- the state for this test: one ofPASSED
,FAILED
,ERROR
,NOT_RUN
,FILTERED_OUT
active
- whether the icon should indicate current activity or notglyph
- whether the icon should contain an accessibility glyph or not- Returns:
- a test icon appropriate to the arguments
-
getTestFolderIcon
Get a test folder icon.- Parameters:
state
- the state for this test: one ofPASSED
,FAILED
,ERROR
,NOT_RUN
,FILTERED_OUT
active
- whether the icon should indicate current activity or notglyph
- whether the icon should contain an accessibility glyph or not- Returns:
- a test folder icon appropriate to the arguments
-
getTestSectionIcon
Get a test section icon.- Parameters:
state
- the state for this test: one ofPASSED
,FAILED
,ERROR
,NOT_RUN
,FILTERED_OUT
- Returns:
- a test section icon appropriate to the arguments
-