javax.swing.plaf.basic

Class BasicRadioButtonUI

public class BasicRadioButtonUI extends BasicToggleButtonUI

The BasicLookAndFeel UI implementation for {@link javax.swing.JRadioButton}s.
Field Summary
protected Iconicon
The default icon for JRadioButtons.
Constructor Summary
BasicRadioButtonUI()
Creates a new instance of BasicButtonUI.
Method Summary
static ComponentUIcreateUI(JComponent c)
Creates and returns a new instance of BasicRadioButtonUI.
IcongetDefaultIcon()
Returns the default icon for JRadioButtons.
DimensiongetPreferredSize(JComponent c)
protected StringgetPropertyPrefix()
Returns the prefix used for UIDefaults properties.
protected voidinstallDefaults(AbstractButton b)
Installs defaults from the Look & Feel table on the specified button.
voidpaint(Graphics g, JComponent c)
Paints the RadioButton.
protected voidpaintFocus(Graphics g, Rectangle tr, Dimension size)
Paints the focus indicator for JRadioButtons.

Field Detail

icon

protected Icon icon
The default icon for JRadioButtons. The default icon displays the usual RadioButton and is sensible to the selection state of the button, and can be used both as normal icon as well as selectedIcon.

Constructor Detail

BasicRadioButtonUI

public BasicRadioButtonUI()
Creates a new instance of BasicButtonUI.

Method Detail

createUI

public static ComponentUI createUI(JComponent c)
Creates and returns a new instance of BasicRadioButtonUI.

Returns: a new instance of BasicRadioButtonUI

getDefaultIcon

public Icon getDefaultIcon()
Returns the default icon for JRadioButtons. The default icon displays the usual RadioButton and is sensible to the selection state of the button, and can be used both as normal icon as well as selectedIcon.

Returns: the default icon for JRadioButtons

getPreferredSize

public Dimension getPreferredSize(JComponent c)

getPropertyPrefix

protected String getPropertyPrefix()
Returns the prefix used for UIDefaults properties. This is RadioButton in this case.

Returns: the prefix used for UIDefaults properties

installDefaults

protected void installDefaults(AbstractButton b)
Installs defaults from the Look & Feel table on the specified button.

Parameters: b the button on which to install the defaults

paint

public void paint(Graphics g, JComponent c)
Paints the RadioButton.

Parameters: g the Graphics context to paint with c the button to paint

paintFocus

protected void paintFocus(Graphics g, Rectangle tr, Dimension size)
Paints the focus indicator for JRadioButtons.

Parameters: g the graphics context tr the rectangle for the text label size the size of the JRadioButton component.