APIdia Launch Partner
Top Description Constructors Methods
javax.swing.plaf.metal

public Class MetalCheckBoxIcon

extends Object
implements Icon, UIResource, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.swing.plaf.UIResource, javax.swing.Icon
Annotations
@SuppressWarnings:serial
Imports
javax.swing.*, java.awt.*, java.awt.event.*, java.io.*, javax.swing.plaf.*

CheckboxIcon implementation for OrganicCheckBoxUI

Warning

Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans has been added to the java.beans package. Please see java.beans.XMLEncoder.

Author
Steve Wilson

Constructor Summary

AccessConstructor and Description
public
MetalCheckBoxIcon()

Constructs a MetalCheckBoxIcon.

Method Summary

Modifier and TypeMethod and Description
protected void
drawCheck(Component
a component
c
,
Graphics
an instance of Graphics
g
,
int
an X coordinate
x
,
int
an Y coordinate
y
)

Paints MetalCheckBoxIcon.

protected int

Returns:

the size of the control
getControlSize
()

Returns the size of the control.

public int
getIconHeight()

Implements javax.swing.Icon.getIconHeight.

Returns the icon's height.

public int
getIconWidth()

Implements javax.swing.Icon.getIconWidth.

Returns the icon's width.

public void
paintIcon(Component c, Graphics g, int x, int y)

Implements javax.swing.Icon.paintIcon.

Draw the icon at the specified location.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MetalCheckBoxIconback to summary
public MetalCheckBoxIcon()

Constructs a MetalCheckBoxIcon.

Method Detail

drawCheckback to summary
protected void drawCheck(Component c, Graphics g, int x, int y)

Paints MetalCheckBoxIcon.

Parameters
c:Component

a component

g:Graphics

an instance of Graphics

x:int

an X coordinate

y:int

an Y coordinate

getControlSizeback to summary
protected int getControlSize()

Returns the size of the control.

Returns:int

the size of the control

getIconHeightback to summary
public int getIconHeight()

Implements javax.swing.Icon.getIconHeight.

Doc from javax.swing.Icon.getIconHeight.

Returns the icon's height.

getIconWidthback to summary
public int getIconWidth()

Implements javax.swing.Icon.getIconWidth.

Doc from javax.swing.Icon.getIconWidth.

Returns the icon's width.

paintIconback to summary
public void paintIcon(Component c, Graphics g, int x, int y)

Implements javax.swing.Icon.paintIcon.

Doc from javax.swing.Icon.paintIcon.

Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.