Package org.geotools.swing.styling
Class JColorIcon
- Object
-
- JColorIcon
-
-
Constructor Summary
Constructors Constructor Description JColorIcon(int width, int height, Color color)
Construtor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIconHeight()
Get the icon's heightint
getIconWidth()
Get the icon's widthvoid
paintIcon(Component c, Graphics g, int x, int y)
Paint the icon using the current color.void
setColor(Color color)
Set the color
-
-
-
Constructor Detail
-
JColorIcon
public JColorIcon(int width, int height, Color color)
Construtor.- Parameters:
width
- icon widthheight
- icon heightcolor
- initial color
-
-
Method Detail
-
paintIcon
public void paintIcon(Component c, Graphics g, int x, int y)
Paint the icon using the current color. This method is invoked by the System.
-
getIconWidth
public int getIconWidth()
Get the icon's width- Specified by:
getIconWidth
in interfaceIcon
- Returns:
- width in pixels
-
getIconHeight
public int getIconHeight()
Get the icon's height- Specified by:
getIconHeight
in interfaceIcon
- Returns:
- height in pixels
-
setColor
public void setColor(Color color)
Set the color- Parameters:
color
- new color
-
-