Package info.monitorenter.gui.util
Class ColorIcon
- java.lang.Object
-
- info.monitorenter.gui.util.ColorIcon
-
- All Implemented Interfaces:
javax.swing.Icon
public class ColorIcon extends java.lang.Object implements javax.swing.Icon
An icon that displays a rectangular
.Color
- Version:
- $Revision: 1.7 $
- Author:
- Achim Westermann
-
-
Constructor Summary
Constructors Constructor Description ColorIcon(java.awt.Color color)
Creates an icon with the given color.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.awt.Color
getColor()
Returns the color of this icon.int
getIconHeight()
int
getIconWidth()
int
hashCode()
void
paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
void
setColor(java.awt.Color color)
Sets the color of this icon.
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
getColor
public final java.awt.Color getColor()
Returns the color of this icon.- Returns:
- the color of this icon.
-
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interfacejavax.swing.Icon
- See Also:
Icon.getIconHeight()
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interfacejavax.swing.Icon
- See Also:
Icon.getIconWidth()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
paintIcon
public void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
- Specified by:
paintIcon
in interfacejavax.swing.Icon
- See Also:
Icon.paintIcon(java.awt.Component, java.awt.Graphics, int, int)
-
setColor
public final void setColor(java.awt.Color color)
Sets the color of this icon.- Parameters:
color
- The color of this icon to set.
-
-