public class MetalCheckBoxIcon extends java.lang.Object implements javax.swing.Icon, javax.swing.plaf.UIResource, java.io.Serializable
Icon used by the MetalCheckBoxUI class.| Constructor and Description |
|---|
MetalCheckBoxIcon()
Creates a new MetalCheckBoxIcon instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
drawCheck(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Draws the check in the CheckBox.
|
protected int |
getControlSize()
Returns the size (both X and Y) of the checkbox icon.
|
int |
getIconHeight()
Returns the height of the icon in pixels.
|
int |
getIconWidth()
Returns the width of the icon in pixels.
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics g,
int x,
int y)
Paints the icon.
|
public MetalCheckBoxIcon()
protected void drawCheck(java.awt.Component c, java.awt.Graphics g, int x, int y)
c - the component to draw ong - the Graphics context to draw withx - the X positiony - the Y positionprotected int getControlSize()
public int getIconWidth()
getIconWidth in interface javax.swing.Iconpublic int getIconHeight()
getIconHeight in interface javax.swing.Iconpublic void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
drawCheck(java.awt.Component, java.awt.Graphics, int, int) to draw
the check.paintIcon in interface javax.swing.Iconc - the Component to draw on (gets casted to JCheckBox)g - the Graphics context to draw withx - the X positiony - the Y position