Package com.formdev.flatlaf.ui
Class FlatRadioButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
javax.swing.plaf.basic.BasicToggleButtonUI
javax.swing.plaf.basic.BasicRadioButtonUI
com.formdev.flatlaf.ui.FlatRadioButtonUI
- All Implemented Interfaces:
FlatStylingSupport.StyleableUI
- Direct Known Subclasses:
FlatCheckBoxUI
Provides the Flat LaF UI delegate for
JRadioButton
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
Hack for missing mouse-exited event for java.awt.Checkbox on macOS (to fix hover effect).protected class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Color
private boolean
protected Color
private boolean
protected int
private final boolean
private static final Insets
Fields inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
icon
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
applyStyle
(AbstractButton b, Object style) protected Object
applyStyleProperty
(AbstractButton b, String key, Object value) protected BasicButtonListener
static ComponentUI
int
getBaseline
(JComponent c, int width, int height) private Color
Returns the default background color of the component.private int
getStyleableValue
(JComponent c, String key) (package private) String
void
protected void
void
private void
void
paint
(Graphics g, JComponent c) protected void
paintText
(Graphics g, AbstractButton b, Rectangle textRect, String text) protected void
protected void
void
Methods inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
getDefaultIcon, getPropertyPrefix, paintFocus
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
getTextShiftOffset, paintIcon
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, installKeyboardActions, installListeners, paintButtonPressed, paintFocus, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
Field Details
-
iconTextGap
protected int iconTextGap -
disabledText
-
defaultBackground
-
defaults_initialized
private boolean defaults_initialized -
oldStyleValues
-
tempInsets
-
-
Constructor Details
-
FlatRadioButtonUI
protected FlatRadioButtonUI(boolean shared) - Since:
- 2
-
-
Method Details
-
createUI
-
installUI
- Overrides:
installUI
in classBasicButtonUI
-
installUIImpl
-
uninstallUI
- Overrides:
uninstallUI
in classBasicButtonUI
-
installDefaults
- Overrides:
installDefaults
in classBasicRadioButtonUI
-
uninstallDefaults
- Overrides:
uninstallDefaults
in classBasicRadioButtonUI
-
createButtonListener
- Overrides:
createButtonListener
in classBasicButtonUI
-
propertyChange
- Since:
- 2
-
installStyle
- Since:
- 2
-
getStyleType
String getStyleType()- Since:
- 2
-
applyStyle
- Since:
- 2
-
applyStyleProperty
- Since:
- 2
-
getStyleableInfos
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
getPreferredSize
- Overrides:
getPreferredSize
in classBasicRadioButtonUI
-
paint
- Overrides:
paint
in classBasicRadioButtonUI
-
paintText
- Overrides:
paintText
in classBasicButtonUI
-
getDefaultBackground
Returns the default background color of the component. If the component is used as cell renderer (e.g. in JTable), then the background color of the renderer container is returned. -
getIconFocusWidth
-
getBaseline
- Overrides:
getBaseline
in classBasicButtonUI
-