java.lang.Object
javax.swing.plaf.metal.MetalIconFactory
- All Implemented Interfaces:
Serializable
Factory object that vends
Icon
s for
the Java look and feel (Metal).
These icons are used extensively in Metal via the defaults mechanism.
While other look and feels often use GIFs for icons, creating icons
in code facilitates switching to other themes.
Each method in this class returns
either an Icon
or null
,
where null
implies that there is no default icon.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeans
has been added to the java.beans
package.
Please see XMLEncoder
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Warning: Serialized objects of this class will not be compatible with future Swing releases.static class
Warning: Serialized objects of this class will not be compatible with future Swing releases.static class
Defines an icon for Palette closestatic class
Warning: Serialized objects of this class will not be compatible with future Swing releases.static class
Warning: Serialized objects of this class will not be compatible with future Swing releases.static class
The class represents a tree leaf icon. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Icon
Returns a checkbox icon.static Icon
Returns an icon to be used byJCheckBoxMenuItem
.static Icon
Returns the instance ofFileChooserDetailViewIcon
.static Icon
Returns the instance ofFileChooserHomeFolderIcon
.static Icon
Returns the instance ofFileChooserListViewIcon
.static Icon
Returns the instance ofFileChooserNewFolderIcon
.static Icon
Returns the instance ofFileChooserUpFolderIcon
.static Icon
Returns a thumb icon to be used by horizontal slider.static Icon
getInternalFrameAltMaximizeIcon
(int size) Constructs a new instance ofInternalFrameAltMaximizeIcon
.static Icon
getInternalFrameCloseIcon
(int size) Constructs a new instance ofInternalFrameCloseIcon
.static Icon
Returns the instance ofInternalFrameDefaultMenuIcon
.static Icon
getInternalFrameMaximizeIcon
(int size) Constructs a new instance ofInternalFrameMaximizeIcon
.static Icon
getInternalFrameMinimizeIcon
(int size) Constructs a new instance ofInternalFrameMinimizeIcon
.static Icon
Returns an icon to be used byJMenu
.static Icon
Returns an icon to be used byJMenuItem
.static Icon
Returns an icon to be used byJCheckBoxMenuItem
.static Icon
Returns the instance ofRadioButtonIcon
.static Icon
Returns an icon to be used byJRadioButtonMenuItem
.static Icon
Returns the instance ofTreeComputerIcon
.static Icon
getTreeControlIcon
(boolean isCollapsed) Constructs a new instance ofTreeControlIcon
.static Icon
Returns the instance ofTreeFloppyDriveIcon
.static Icon
Constructs a new instance ofTreeFolderIcon
.static Icon
Returns the instance ofTreeHardDriveIcon
.static Icon
Constructs a new instance ofTreeLeafIcon
.static Icon
Returns a thumb icon to be used by vertical slider.
-
Field Details
-
DARK
public static final boolean DARKDARK
is used for the propertyTree.expandedIcon
.- See Also:
-
LIGHT
public static final boolean LIGHTLIGHT
is used for the propertyTree.collapsedIcon
.- See Also:
-
-
Constructor Details
-
MetalIconFactory
public MetalIconFactory()Constructs aMetalIconFactory
.
-
-
Method Details
-
getFileChooserDetailViewIcon
Returns the instance ofFileChooserDetailViewIcon
.- Returns:
- the instance of
FileChooserDetailViewIcon
-
getFileChooserHomeFolderIcon
Returns the instance ofFileChooserHomeFolderIcon
.- Returns:
- the instance of
FileChooserHomeFolderIcon
-
getFileChooserListViewIcon
Returns the instance ofFileChooserListViewIcon
.- Returns:
- the instance of
FileChooserListViewIcon
-
getFileChooserNewFolderIcon
Returns the instance ofFileChooserNewFolderIcon
.- Returns:
- the instance of
FileChooserNewFolderIcon
-
getFileChooserUpFolderIcon
Returns the instance ofFileChooserUpFolderIcon
.- Returns:
- the instance of
FileChooserUpFolderIcon
-
getInternalFrameAltMaximizeIcon
Constructs a new instance ofInternalFrameAltMaximizeIcon
.- Parameters:
size
- the size of the icon- Returns:
- a new instance of
InternalFrameAltMaximizeIcon
-
getInternalFrameCloseIcon
Constructs a new instance ofInternalFrameCloseIcon
.- Parameters:
size
- the size of the icon- Returns:
- a new instance of
InternalFrameCloseIcon
-
getInternalFrameDefaultMenuIcon
Returns the instance ofInternalFrameDefaultMenuIcon
.- Returns:
- the instance of
InternalFrameDefaultMenuIcon
-
getInternalFrameMaximizeIcon
Constructs a new instance ofInternalFrameMaximizeIcon
.- Parameters:
size
- the size of the icon- Returns:
- a new instance of
InternalFrameMaximizeIcon
-
getInternalFrameMinimizeIcon
Constructs a new instance ofInternalFrameMinimizeIcon
.- Parameters:
size
- the size of the icon- Returns:
- a new instance of
InternalFrameMinimizeIcon
-
getRadioButtonIcon
Returns the instance ofRadioButtonIcon
.- Returns:
- the instance of
RadioButtonIcon
-
getCheckBoxIcon
-
getTreeComputerIcon
Returns the instance ofTreeComputerIcon
.- Returns:
- the instance of
TreeComputerIcon
-
getTreeFloppyDriveIcon
Returns the instance ofTreeFloppyDriveIcon
.- Returns:
- the instance of
TreeFloppyDriveIcon
-
getTreeFolderIcon
Constructs a new instance ofTreeFolderIcon
.- Returns:
- a new instance of
TreeFolderIcon
-
getTreeHardDriveIcon
Returns the instance ofTreeHardDriveIcon
.- Returns:
- the instance of
TreeHardDriveIcon
-
getTreeLeafIcon
Constructs a new instance ofTreeLeafIcon
.- Returns:
- a new instance of
TreeLeafIcon
-
getTreeControlIcon
Constructs a new instance ofTreeControlIcon
.- Parameters:
isCollapsed
- iftrue
the icon is collapsed- Returns:
- a new instance of
TreeControlIcon
-
getMenuArrowIcon
Returns an icon to be used byJMenu
.- Returns:
- an icon to be used by
JMenu
-
getMenuItemCheckIcon
Returns an icon to be used byJCheckBoxMenuItem
.- Returns:
- the default icon for check box menu items,
or
null
if no default exists
-
getMenuItemArrowIcon
Returns an icon to be used byJMenuItem
.- Returns:
- an icon to be used by
JMenuItem
-
getCheckBoxMenuItemIcon
Returns an icon to be used byJCheckBoxMenuItem
.- Returns:
- an icon to be used by
JCheckBoxMenuItem
-
getRadioButtonMenuItemIcon
Returns an icon to be used byJRadioButtonMenuItem
.- Returns:
- an icon to be used by
JRadioButtonMenuItem
-
getHorizontalSliderThumbIcon
Returns a thumb icon to be used by horizontal slider.- Returns:
- a thumb icon to be used by horizontal slider
-
getVerticalSliderThumbIcon
Returns a thumb icon to be used by vertical slider.- Returns:
- a thumb icon to be used by vertical slider
-