tools
Class BackgroundIcon
java.lang.Object
tools.BackgroundIcon
- All Implemented Interfaces:
- javax.swing.Icon
public class BackgroundIcon
- extends java.lang.Object
- implements javax.swing.Icon
A simple class to represent a rectangular icon with a fill color and a black border.
- Author:
- Collin Fagan
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
width
private int width
height
private int height
backgroundColor
private java.awt.Color backgroundColor
BackgroundIcon
public BackgroundIcon()
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
- Specified by:
paintIcon
in interface javax.swing.Icon
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interface javax.swing.Icon
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interface javax.swing.Icon
getBackgroundColor
public java.awt.Color getBackgroundColor()
- Returns:
- the backgroundColor
setBackgroundColor
public void setBackgroundColor(java.awt.Color backgroundColor)
- Parameters:
backgroundColor
- the backgroundColor to set