Class MetalIconFactory

java.lang.Object
javax.swing.plaf.metal.MetalIconFactory
All Implemented Interfaces:
Serializable

public class MetalIconFactory extends Object implements Serializable
Factory object that vends Icons 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.

  • Field Details Link icon

    • DARK Link icon

      public static final boolean DARK
      DARK is used for the property Tree.expandedIcon.
      See Also:
    • LIGHT Link icon

      public static final boolean LIGHT
      LIGHT is used for the property Tree.collapsedIcon.
      See Also:
  • Constructor Details Link icon

    • MetalIconFactory Link icon

      public MetalIconFactory()
      Constructs a MetalIconFactory.
  • Method Details Link icon

    • getFileChooserDetailViewIcon Link icon

      public static Icon getFileChooserDetailViewIcon()
      Returns the instance of FileChooserDetailViewIcon.
      Returns:
      the instance of FileChooserDetailViewIcon
    • getFileChooserHomeFolderIcon Link icon

      public static Icon getFileChooserHomeFolderIcon()
      Returns the instance of FileChooserHomeFolderIcon.
      Returns:
      the instance of FileChooserHomeFolderIcon
    • getFileChooserListViewIcon Link icon

      public static Icon getFileChooserListViewIcon()
      Returns the instance of FileChooserListViewIcon.
      Returns:
      the instance of FileChooserListViewIcon
    • getFileChooserNewFolderIcon Link icon

      public static Icon getFileChooserNewFolderIcon()
      Returns the instance of FileChooserNewFolderIcon.
      Returns:
      the instance of FileChooserNewFolderIcon
    • getFileChooserUpFolderIcon Link icon

      public static Icon getFileChooserUpFolderIcon()
      Returns the instance of FileChooserUpFolderIcon.
      Returns:
      the instance of FileChooserUpFolderIcon
    • getInternalFrameAltMaximizeIcon Link icon

      public static Icon getInternalFrameAltMaximizeIcon(int size)
      Constructs a new instance of InternalFrameAltMaximizeIcon.
      Parameters:
      size - the size of the icon
      Returns:
      a new instance of InternalFrameAltMaximizeIcon
    • getInternalFrameCloseIcon Link icon

      public static Icon getInternalFrameCloseIcon(int size)
      Constructs a new instance of InternalFrameCloseIcon.
      Parameters:
      size - the size of the icon
      Returns:
      a new instance of InternalFrameCloseIcon
    • getInternalFrameDefaultMenuIcon Link icon

      public static Icon getInternalFrameDefaultMenuIcon()
      Returns the instance of InternalFrameDefaultMenuIcon.
      Returns:
      the instance of InternalFrameDefaultMenuIcon
    • getInternalFrameMaximizeIcon Link icon

      public static Icon getInternalFrameMaximizeIcon(int size)
      Constructs a new instance of InternalFrameMaximizeIcon.
      Parameters:
      size - the size of the icon
      Returns:
      a new instance of InternalFrameMaximizeIcon
    • getInternalFrameMinimizeIcon Link icon

      public static Icon getInternalFrameMinimizeIcon(int size)
      Constructs a new instance of InternalFrameMinimizeIcon.
      Parameters:
      size - the size of the icon
      Returns:
      a new instance of InternalFrameMinimizeIcon
    • getRadioButtonIcon Link icon

      public static Icon getRadioButtonIcon()
      Returns the instance of RadioButtonIcon.
      Returns:
      the instance of RadioButtonIcon
    • getCheckBoxIcon Link icon

      public static Icon getCheckBoxIcon()
      Returns a checkbox icon.
      Returns:
      a checkbox icon
      Since:
      1.3
    • getTreeComputerIcon Link icon

      public static Icon getTreeComputerIcon()
      Returns the instance of TreeComputerIcon.
      Returns:
      the instance of TreeComputerIcon
    • getTreeFloppyDriveIcon Link icon

      public static Icon getTreeFloppyDriveIcon()
      Returns the instance of TreeFloppyDriveIcon.
      Returns:
      the instance of TreeFloppyDriveIcon
    • getTreeFolderIcon Link icon

      public static Icon getTreeFolderIcon()
      Constructs a new instance of TreeFolderIcon.
      Returns:
      a new instance of TreeFolderIcon
    • getTreeHardDriveIcon Link icon

      public static Icon getTreeHardDriveIcon()
      Returns the instance of TreeHardDriveIcon.
      Returns:
      the instance of TreeHardDriveIcon
    • getTreeLeafIcon Link icon

      public static Icon getTreeLeafIcon()
      Constructs a new instance of TreeLeafIcon.
      Returns:
      a new instance of TreeLeafIcon
    • getTreeControlIcon Link icon

      public static Icon getTreeControlIcon(boolean isCollapsed)
      Constructs a new instance of TreeControlIcon.
      Parameters:
      isCollapsed - if true the icon is collapsed
      Returns:
      a new instance of TreeControlIcon
    • getMenuArrowIcon Link icon

      public static Icon getMenuArrowIcon()
      Returns an icon to be used by JMenu.
      Returns:
      an icon to be used by JMenu
    • getMenuItemCheckIcon Link icon

      public static Icon getMenuItemCheckIcon()
      Returns an icon to be used by JCheckBoxMenuItem.
      Returns:
      the default icon for check box menu items, or null if no default exists
    • getMenuItemArrowIcon Link icon

      public static Icon getMenuItemArrowIcon()
      Returns an icon to be used by JMenuItem.
      Returns:
      an icon to be used by JMenuItem
    • getCheckBoxMenuItemIcon Link icon

      public static Icon getCheckBoxMenuItemIcon()
      Returns an icon to be used by JCheckBoxMenuItem.
      Returns:
      an icon to be used by JCheckBoxMenuItem
    • getRadioButtonMenuItemIcon Link icon

      public static Icon getRadioButtonMenuItemIcon()
      Returns an icon to be used by JRadioButtonMenuItem.
      Returns:
      an icon to be used by JRadioButtonMenuItem
    • getHorizontalSliderThumbIcon Link icon

      public static Icon getHorizontalSliderThumbIcon()
      Returns a thumb icon to be used by horizontal slider.
      Returns:
      a thumb icon to be used by horizontal slider
    • getVerticalSliderThumbIcon Link icon

      public static Icon getVerticalSliderThumbIcon()
      Returns a thumb icon to be used by vertical slider.
      Returns:
      a thumb icon to be used by vertical slider