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 TypeMethodDescriptionint
Get the icon's heightint
Get the icon's widthvoid
Paint the icon using the current color.void
Set 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:
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
Set the color- Parameters:
color
- new color
-