Package adams.gui.core
Class CustomColorImageIcon
- java.lang.Object
-
- javax.swing.ImageIcon
-
- adams.gui.core.CustomColorImageIcon
-
- All Implemented Interfaces:
Serializable
,Accessible
,Icon
public class CustomColorImageIcon extends ImageIcon
A specialized ImageIcon that simply fills in a rectangle with the specified color.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javax.swing.ImageIcon
ImageIcon.AccessibleImageIcon
-
-
Constructor Summary
Constructors Constructor Description CustomColorImageIcon(int width, int height, Color color)
Initializes the icon.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BufferedImage
createImage(int width, int height, Color color)
Creates a BufferedImage with the specified dimensions and fills it with the color.-
Methods inherited from class javax.swing.ImageIcon
getAccessibleContext, getDescription, getIconHeight, getIconWidth, getImage, getImageLoadStatus, getImageObserver, loadImage, paintIcon, setDescription, setImage, setImageObserver, toString
-
-
-
-
Constructor Detail
-
CustomColorImageIcon
public CustomColorImageIcon(int width, int height, Color color)
Initializes the icon.- Parameters:
width
- the widthheight
- the heightcolor
- the color for filling
-
-
Method Detail
-
createImage
public static BufferedImage createImage(int width, int height, Color color)
Creates a BufferedImage with the specified dimensions and fills it with the color.- Parameters:
width
- the widthheight
- the heightcolor
- the color for filling- Returns:
- the image
-
-