Package 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
Fields Modifier and Type Field Description static int
ERROR
A convenience redefinition ofStatus.ERROR
.static int
FAILED
A convenience redefinition ofStatus.FAILED
.static int
FILTERED_OUT
A constant indicating that as icon should be represented as "filtered out".static int
NOT_RUN
A convenience redefinition ofStatus.NOT_RUN
.static int
NUM_STATES
A constant indicating the number of different value "state" values.static int
PASSED
A convenience redefinition ofStatus.PASSED
.
-
Constructor Summary
Constructors Constructor Description IconFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Field Detail
-
PASSED
public static final int PASSED
A convenience redefinition ofStatus.PASSED
.- See Also:
- Constant Field Values
-
FAILED
public static final int FAILED
A convenience redefinition ofStatus.FAILED
.- See Also:
- Constant Field Values
-
ERROR
public static final int ERROR
A convenience redefinition ofStatus.ERROR
.- See Also:
- Constant Field Values
-
NOT_RUN
public static final int NOT_RUN
A convenience redefinition ofStatus.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
-
-
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 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
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 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
public static javax.swing.Icon getTestSectionIcon(int state)
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
-
-