Package org.geotools.swing.styling
Class JColorIcon
Object
JColorIcon
- All Implemented Interfaces:
Icon
An Icon to display a color. Used by
JSimpleStyleDialog.- Since:
- 2.6
- Author:
- Michael Bedward
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the icon's heightintGet the icon's widthvoidPaint the icon using the current color.voidSet the color
-
Constructor Details
-
JColorIcon
Construtor.- Parameters:
width- icon widthheight- icon heightcolor- initial color
-
-
Method Details
-
paintIcon
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:
getIconWidthin interfaceIcon- Returns:
- width in pixels
-
getIconHeight
public int getIconHeight()Get the icon's height- Specified by:
getIconHeightin interfaceIcon- Returns:
- height in pixels
-
setColor
Set the color- Parameters:
color- new color
-