# Class IconUtils

java.lang.Object
jam.util.IconUtils

public class IconUtils extends Object

Author:
  rambaut Date: Jul 29, 2004 Time: 10:12:49 AM

## Constructor Summary

Constructors
Constructor
Description
`IconUtils()`

## Method Summary

Modifier and Type
Method
Description
`static Icon`
`brighten(Icon icon)`
Returns a slightly brighter version of the icon.
`static Icon`
`darken(Icon icon)`
Returns a slightly darker version of the icon.
`static BufferedImage`
`getBufferedImage(Class resourceClass, String name)`
`static BufferedImage`
`getBufferedImage(String name)`
`static BufferedImage`
`getBufferedImageFromIcon(Icon icon)`
Creates a buffered image from an icon.
`static Icon`
`getIcon(Class resourceClass, String name)`
`static Icon`
`getIcon(String name)`
`static Image`
`getImage(Class resourceClass, String name)`
`static Image`
`getImage(String name)`
`static Image`
`getImageFromIcon(Icon icon)`
Creates an image from an icon.
`static Icon`
`gray(Icon icon)`
Returns a grayed version of the icon.
`static Icon`
`resize(Icon icon, int width, int height)`
Resizes an icon.

### Methods inherited from class Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### IconUtils

public IconUtils()

## Method Details

### getImage

public static Image getImage(String name)

Returns:
  a named image from file or resource bundle.

### getImage

public static Image getImage(Class resourceClass, String name)

Returns:
  a named image from file or resource bundle.

### getBufferedImage

public static BufferedImage getBufferedImage(String name)

Returns:
  a named image from file or resource bundle.

### getBufferedImage

public static BufferedImage getBufferedImage(Class resourceClass, String name)

Returns:
  a named image from file or resource bundle.

### getIcon

public static Icon getIcon(String name)

Returns:
  a named icon from file or resource bundle.

### getIcon

public static Icon getIcon(Class resourceClass, String name)

Returns:
  a named icon from file or resource bundle.

### brighten

public static Icon brighten(Icon icon)
Returns a slightly brighter version of the icon.

### darken

public static Icon darken(Icon icon)
Returns a slightly darker version of the icon.

### gray

public static Icon gray(Icon icon)
Returns a grayed version of the icon.

### resize

public static Icon resize(Icon icon, int width, int height)
Resizes an icon.

### getImageFromIcon

public static Image getImageFromIcon(Icon icon)
Creates an image from an icon.

### getBufferedImageFromIcon

public static BufferedImage getBufferedImageFromIcon(Icon icon)
Creates a buffered image from an icon.