public class BasicRadioButtonUI extends BasicToggleButtonUI
JRadioButton
s.Modifier and Type | Field and Description |
---|---|
protected Icon |
icon
The default icon for JRadioButtons.
|
defaultTextIconGap, defaultTextShiftOffset
Constructor and Description |
---|
BasicRadioButtonUI()
Creates a new instance of
BasicButtonUI . |
Modifier and Type | Method and Description |
---|---|
static ComponentUI |
createUI(JComponent c)
Creates and returns a new instance of
BasicRadioButtonUI . |
Icon |
getDefaultIcon()
Returns the default icon for JRadioButtons.
|
Dimension |
getPreferredSize(JComponent c)
Calculate the preferred size of this component, by delegating to
BasicGraphicsUtils.getPreferredButtonSize(javax.swing.AbstractButton, int) . |
protected String |
getPropertyPrefix()
Returns the prefix used for UIDefaults properties.
|
protected void |
installDefaults(AbstractButton b)
Installs defaults from the Look & Feel table on the specified
button.
|
void |
paint(Graphics g,
JComponent c)
Paints the RadioButton.
|
protected void |
paintFocus(Graphics g,
Rectangle tr,
Dimension size)
Paints the focus indicator for JRadioButtons.
|
paintIcon
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
public BasicRadioButtonUI()
BasicButtonUI
.public static ComponentUI createUI(JComponent c)
BasicRadioButtonUI
.BasicRadioButtonUI
protected void installDefaults(AbstractButton b)
installDefaults
in class BasicButtonUI
b
- the button on which to install the defaultsprotected String getPropertyPrefix()
RadioButton
in this case.getPropertyPrefix
in class BasicToggleButtonUI
public Icon getDefaultIcon()
public void paint(Graphics g, JComponent c)
paint
in class BasicToggleButtonUI
g
- the Graphics context to paint withc
- the button to paintpublic Dimension getPreferredSize(JComponent c)
BasicButtonUI
BasicGraphicsUtils.getPreferredButtonSize(javax.swing.AbstractButton, int)
.getPreferredSize
in class BasicButtonUI
c
- The component to measureprotected void paintFocus(Graphics g, Rectangle tr, Dimension size)
g
- the graphics contexttr
- the rectangle for the text labelsize
- the size of the JRadioButton
component.