public class ColorIcon
extends java.lang.Object
implements javax.swing.Icon
Constructor and Description |
---|
ColorIcon(java.awt.Color color) |
ColorIcon(java.awt.Color color,
java.lang.String name) |
ColorIcon(java.awt.Color color,
java.lang.String name,
int width,
int height) |
ColorIcon(int rgb)
Creates a new instance.
|
ColorIcon(int rgb,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getColor() |
int |
getIconHeight() |
int |
getIconWidth() |
java.lang.String |
getName() |
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y) |
public ColorIcon(int rgb)
public ColorIcon(java.awt.Color color)
public ColorIcon(int rgb, java.lang.String name)
public ColorIcon(java.awt.Color color, java.lang.String name)
public ColorIcon(java.awt.Color color, java.lang.String name, int width, int height)
public java.awt.Color getColor()
public java.lang.String getName()
public int getIconWidth()
getIconWidth
in interface javax.swing.Icon
public int getIconHeight()
getIconHeight
in interface javax.swing.Icon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
paintIcon
in interface javax.swing.Icon