javax.swing.plaf.metal

Class MetalIconFactory

public class MetalIconFactory extends Object implements Serializable

Creates icons for the {@link MetalLookAndFeel}.
Nested Class Summary
static classMetalIconFactory.FileIcon16
An icon representing a file (drawn as a piece of paper with the top-right corner turned down).
static classMetalIconFactory.FolderIcon16
An icon representing a folder.
static classMetalIconFactory.PaletteCloseIcon
An icon used by the {@link MetalInternalFrameUI} class when the frame is displayed as a palette.
static classMetalIconFactory.TreeControlIcon
A tree control icon.
static classMetalIconFactory.TreeFolderIcon
A tree folder icon.
static classMetalIconFactory.TreeLeafIcon
A tree leaf icon.
Field Summary
static booleanDARK
A constant representing "dark".
static booleanLIGHT
A constant representing "light".
Constructor Summary
MetalIconFactory()
Creates a new instance.
Method Summary
static IcongetCheckBoxIcon()
Returns an icon for use when rendering the {@link JCheckBox} component.
static IcongetCheckBoxMenuItemIcon()
Returns an icon for use when rendering the {@link JCheckBoxMenuItem} component.
static IcongetFileChooserDetailViewIcon()
Returns an icon for use by the {@link JFileChooser} component.
static IcongetFileChooserHomeFolderIcon()
Returns an icon for use by the {@link JFileChooser} component.
static IcongetFileChooserListViewIcon()
Returns an icon for use by the {@link JFileChooser} component.
static IcongetFileChooserNewFolderIcon()
Returns an icon for use by the {@link JFileChooser} component.
static IcongetFileChooserUpFolderIcon()
Returns an icon for use by the {@link JFileChooser} component.
static IcongetHorizontalSliderThumbIcon()
Returns the icon used to display the thumb for a horizontally oriented {@link JSlider}.
static IcongetInternalFrameAltMaximizeIcon(int size)
Creates a new icon for the 'restore' button in a {@link JInternalFrame} that has been maximised.
static IcongetInternalFrameCloseIcon(int size)
Creates a new icon used to represent the 'close' button in the title pane of a {@link JInternalFrame}.
static IcongetInternalFrameDefaultMenuIcon()
Creates a new icon for the menu in a {@link JInternalFrame}.
static IcongetInternalFrameMaximizeIcon(int size)
Creates a new icon for the 'maximize' button in a {@link JInternalFrame}.
static IcongetInternalFrameMinimizeIcon(int size)
Returns the icon used for the minimize button in the frame title for a {@link JInternalFrame}.
static IcongetMenuArrowIcon()
Returns a new instance of a 4 x 8 icon showing a small black triangle that points to the right.
static IcongetMenuItemArrowIcon()
Returns a new instance of a 4 x 8 icon showing a small black triangle that points to the right.
static IcongetMenuItemCheckIcon()
Returns a new instance of a 13 x 13 icon showing a small black check mark.
static IcongetRadioButtonIcon()
Returns an icon for RadioButtons in the Metal L&F.
static IcongetRadioButtonMenuItemIcon()
Creates a new instance of the icon used in a {@link JRadioButtonMenuItem}.
static IcongetTreeComputerIcon()
Returns a 16x16 icon representing a computer.
static IcongetTreeControlIcon(boolean isCollapsed)
Creates and returns a tree control icon.
static IcongetTreeFloppyDriveIcon()
Returns a 16x16 icon representing a floppy disk.
static IcongetTreeFolderIcon()
Creates and returns a new tree folder icon.
static IcongetTreeHardDriveIcon()
Returns a 16x16 icon representing a hard disk.
static IcongetTreeLeafIcon()
Creates and returns a new tree leaf icon.
static IcongetVerticalSliderThumbIcon()
Returns the icon used to display the thumb for a vertically oriented {@link JSlider}.

Field Detail

DARK

public static final boolean DARK
A constant representing "dark".

LIGHT

public static final boolean LIGHT
A constant representing "light".

Constructor Detail

MetalIconFactory

public MetalIconFactory()
Creates a new instance. All the methods are static, so creating an instance isn't necessary.

Method Detail

getCheckBoxIcon

public static Icon getCheckBoxIcon()
Returns an icon for use when rendering the {@link JCheckBox} component.

Returns: A check box icon.

Since: 1.3

getCheckBoxMenuItemIcon

public static Icon getCheckBoxMenuItemIcon()
Returns an icon for use when rendering the {@link JCheckBoxMenuItem} component.

Returns: An icon.

getFileChooserDetailViewIcon

public static Icon getFileChooserDetailViewIcon()
Returns an icon for use by the {@link JFileChooser} component.

Returns: An icon.

getFileChooserHomeFolderIcon

public static Icon getFileChooserHomeFolderIcon()
Returns an icon for use by the {@link JFileChooser} component.

Returns: An icon.

getFileChooserListViewIcon

public static Icon getFileChooserListViewIcon()
Returns an icon for use by the {@link JFileChooser} component.

Returns: An icon.

getFileChooserNewFolderIcon

public static Icon getFileChooserNewFolderIcon()
Returns an icon for use by the {@link JFileChooser} component.

Returns: An icon.

getFileChooserUpFolderIcon

public static Icon getFileChooserUpFolderIcon()
Returns an icon for use by the {@link JFileChooser} component.

Returns: An icon.

getHorizontalSliderThumbIcon

public static Icon getHorizontalSliderThumbIcon()
Returns the icon used to display the thumb for a horizontally oriented {@link JSlider}.

Returns: The icon.

getInternalFrameAltMaximizeIcon

public static Icon getInternalFrameAltMaximizeIcon(int size)
Creates a new icon for the 'restore' button in a {@link JInternalFrame} that has been maximised.

Parameters: size the icon size in pixels.

Returns: The icon.

See Also: MetalIconFactory

getInternalFrameCloseIcon

public static Icon getInternalFrameCloseIcon(int size)
Creates a new icon used to represent the 'close' button in the title pane of a {@link JInternalFrame}.

Parameters: size the icon size.

Returns: A close icon.

getInternalFrameDefaultMenuIcon

public static Icon getInternalFrameDefaultMenuIcon()
Creates a new icon for the menu in a {@link JInternalFrame}. This is the icon displayed at the top left of the frame.

Returns: A menu icon.

getInternalFrameMaximizeIcon

public static Icon getInternalFrameMaximizeIcon(int size)
Creates a new icon for the 'maximize' button in a {@link JInternalFrame}.

Parameters: size the icon size in pixels.

Returns: The icon.

See Also: MetalIconFactory

getInternalFrameMinimizeIcon

public static Icon getInternalFrameMinimizeIcon(int size)
Returns the icon used for the minimize button in the frame title for a {@link JInternalFrame}.

Parameters: size the icon size in pixels (ignored by this implementation).

Returns: The icon.

getMenuArrowIcon

public static Icon getMenuArrowIcon()
Returns a new instance of a 4 x 8 icon showing a small black triangle that points to the right. This is displayed in menu items that have a sub menu.

Returns: The icon.

getMenuItemArrowIcon

public static Icon getMenuItemArrowIcon()
Returns a new instance of a 4 x 8 icon showing a small black triangle that points to the right. This is displayed in menu items that have a sub menu.

Returns: The icon.

getMenuItemCheckIcon

public static Icon getMenuItemCheckIcon()
Returns a new instance of a 13 x 13 icon showing a small black check mark.

Returns: The icon.

getRadioButtonIcon

public static Icon getRadioButtonIcon()
Returns an icon for RadioButtons in the Metal L&F.

Returns: an icon for RadioButtons in the Metal L&F

getRadioButtonMenuItemIcon

public static Icon getRadioButtonMenuItemIcon()
Creates a new instance of the icon used in a {@link JRadioButtonMenuItem}.

Returns: A new icon instance.

getTreeComputerIcon

public static Icon getTreeComputerIcon()
Returns a 16x16 icon representing a computer.

Returns: The icon.

getTreeControlIcon

public static Icon getTreeControlIcon(boolean isCollapsed)
Creates and returns a tree control icon.

Parameters: isCollapsed a flag that controls whether the icon is in the collapsed or expanded state.

Returns: A tree control icon.

getTreeFloppyDriveIcon

public static Icon getTreeFloppyDriveIcon()
Returns a 16x16 icon representing a floppy disk.

Returns: The icon.

getTreeFolderIcon

public static Icon getTreeFolderIcon()
Creates and returns a new tree folder icon.

Returns: A new tree folder icon.

getTreeHardDriveIcon

public static Icon getTreeHardDriveIcon()
Returns a 16x16 icon representing a hard disk.

Returns: The icon.

getTreeLeafIcon

public static Icon getTreeLeafIcon()
Creates and returns a new tree leaf icon.

Returns: A new tree leaf icon.

getVerticalSliderThumbIcon

public static Icon getVerticalSliderThumbIcon()
Returns the icon used to display the thumb for a vertically oriented {@link JSlider}.

Returns: The icon.