public class ColorIcon extends Object implements Icon
Color
.
Constructor and Description |
---|
ColorIcon(Color color)
Creates an icon with the given color.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Color |
getColor()
Returns the color of this icon.
|
int |
getIconHeight() |
int |
getIconWidth() |
int |
hashCode() |
void |
paintIcon(Component c,
Graphics g,
int x,
int y) |
void |
setColor(Color color)
Sets the color of this icon.
|
public ColorIcon(Color color)
color
- the color of this icon.public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public final Color getColor()
public int getIconHeight()
getIconHeight
in interface Icon
Icon.getIconHeight()
public int getIconWidth()
getIconWidth
in interface Icon
Icon.getIconWidth()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public void paintIcon(Component c, Graphics g, int x, int y)
paintIcon
in interface Icon
Icon.paintIcon(java.awt.Component, java.awt.Graphics, int,
int)
public final void setColor(Color color)
color
- The color of this icon to set.Copyright © 2019. All rights reserved.