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 intgetIconHeight()Get the icon's heightintgetIconWidth()Get the icon's widthvoidpaintIcon(Component c, Graphics g, int x, int y)Paint the icon using the current color.voidsetColor(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:
getIconWidthin interfaceIcon- Returns:
- width in pixels
-
getIconHeight
public int getIconHeight()
Get the icon's height- Specified by:
getIconHeightin interfaceIcon- Returns:
- height in pixels
-
setColor
public void setColor(Color color)
Set the color- Parameters:
color- new color
-
-