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.IconAn 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 booleanequals(java.lang.Object obj)java.awt.ColorgetColor()Returns the color of this icon.intgetIconHeight()intgetIconWidth()inthashCode()voidpaintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)voidsetColor(java.awt.Color color)Sets the color of this icon.
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin 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:
getIconHeightin interfacejavax.swing.Icon- See Also:
Icon.getIconHeight()
-
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidthin interfacejavax.swing.Icon- See Also:
Icon.getIconWidth()
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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:
paintIconin 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.
-
-