javax.swing.plaf.metal
public class MetalRadioButtonUI extends BasicRadioButtonUI
JRadioButton
component.Modifier and Type | Field and Description |
---|---|
protected Color |
disabledTextColor
Used to draw disabled text.
|
protected Color |
focusColor
Used to draw the focus rectangle.
|
protected Color |
selectColor
Used to fill the icon when the button is pressed.
|
icon
defaultTextIconGap, defaultTextShiftOffset
Constructor and Description |
---|
MetalRadioButtonUI()
Constructs a new instance of
MetalRadioButtonUI . |
Modifier and Type | Method and Description |
---|---|
static ComponentUI |
createUI(JComponent component)
Returns a new instance of
MetalRadioButtonUI . |
protected Color |
getDisabledTextColor()
Returns the color for the
JRadioButton 's text when the button is
disabled. |
protected Color |
getFocusColor()
Returns the color used to draw the focus rectangle when the
JRadioButton has the focus. |
protected Color |
getSelectColor()
Returns the color used to fill the
JRadioButton 's icon when the
button is pressed. |
void |
installDefaults(AbstractButton b)
Sets the default values for the specified button.
|
void |
paint(Graphics g,
JComponent c)
Paints the
JRadioButton . |
protected void |
paintFocus(Graphics g,
Rectangle t,
Dimension d)
Paints the focus rectangle for the
JRadioButton . |
protected void |
uninstallDefaults(AbstractButton b)
Clears any defaults set in the installDefaults() method.
|
getDefaultIcon, getPreferredSize, getPropertyPrefix
paintIcon
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
protected Color focusColor
protected Color selectColor
protected Color disabledTextColor
public MetalRadioButtonUI()
MetalRadioButtonUI
.public static ComponentUI createUI(JComponent component)
MetalRadioButtonUI
.component
- the component for which we return an UI instanceMetalRadioButtonUI
.public void installDefaults(AbstractButton b)
installDefaults
in class BasicRadioButtonUI
b
- the button.protected void uninstallDefaults(AbstractButton b)
uninstallDefaults
in class BasicButtonUI
b
- the JRadioButton
.protected Color getSelectColor()
JRadioButton
's icon when the
button is pressed. The default color is obtained from the
UIManager
defaults via an entry with the key
RadioButton.select
.protected Color getDisabledTextColor()
JRadioButton
's text when the button is
disabled. The default color is obtained from the UIManager
defaults via an entry with the key RadioButton.disabledText
.protected Color getFocusColor()
JRadioButton
has the focus. The default color is obtained from
the UIManager
defaults via an entry with the key
RadioButton.focus
.paintFocus(Graphics, Rectangle, Dimension)
public void paint(Graphics g, JComponent c)
JRadioButton
.paint
in class BasicRadioButtonUI
g
- the graphics device.c
- the component (an instance of JRadioButton
).protected void paintFocus(Graphics g, Rectangle t, Dimension d)
JRadioButton
.paintFocus
in class BasicRadioButtonUI
g
- the graphics device.t
- the bounding rectangle for the text.d
- ???