public static class StyleDialog.ColorIcon extends Object implements Icon
Modifier and Type | Field and Description |
---|---|
protected Color |
color
Color of the icon.
|
protected int |
height
Height of the icon.
|
protected int |
width
Width of the icon.
|
Constructor and Description |
---|
StyleDialog.ColorIcon()
Creates a new white ColorIcon with a size of 20x10.
|
StyleDialog.ColorIcon(int width,
int height,
Color color)
Creates a new ColorIcon with the specified size and color.
|
Modifier and Type | Method and Description |
---|---|
Color |
getColor()
Returns the color of this icon.
|
int |
getIconHeight()
Returns the height of this icon.
|
int |
getIconWidth()
Returns the width of this icon.
|
void |
paintIcon(Component c,
Graphics g,
int x,
int y) |
void |
setColor(Color color)
Sets the new color of this icon.
|
protected int width
protected int height
protected Color color
public StyleDialog.ColorIcon()
public StyleDialog.ColorIcon(int width, int height, Color color)
width
- Width of this icon.height
- Height of this icon.color
- Color of this icon.public int getIconWidth()
getIconWidth
in interface Icon
public int getIconHeight()
getIconHeight
in interface Icon
public Color getColor()
public void setColor(Color color)
color
- The new color.Copyright © 2001-2013 the JGloss developers. All Rights Reserved.