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
public class FlatRadioButtonUI extends BasicRadioButtonUI implements FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate forJRadioButton
.- UiDefault:
- RadioButton.font Font, RadioButton.background Color, RadioButton.foreground Color, RadioButton.border Border, RadioButton.margin Insets, RadioButton.rollover boolean, RadioButton.icon Icon , RadioButton.iconTextGap int, RadioButton.disabledText Color
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
FlatRadioButtonUI.FlatRadioButtonListener
-
Field Summary
Fields Modifier and Type Field Description protected Color
disabledText
protected int
iconTextGap
-
Fields inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
icon
-
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FlatRadioButtonUI(boolean shared)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyStyle(AbstractButton b, Object style)
protected Object
applyStyleProperty(AbstractButton b, String key, Object value)
protected BasicButtonListener
createButtonListener(AbstractButton b)
static ComponentUI
createUI(JComponent c)
Dimension
getPreferredSize(JComponent c)
Map<String,Class<?>>
getStyleableInfos(JComponent c)
Object
getStyleableValue(JComponent c, String key)
void
installDefaults(AbstractButton b)
protected void
installStyle(AbstractButton b)
void
installUI(JComponent c)
void
paint(Graphics g, JComponent c)
protected void
paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
protected void
propertyChange(AbstractButton b, PropertyChangeEvent e)
protected void
uninstallDefaults(AbstractButton b)
void
uninstallUI(JComponent c)
-
Methods inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
getDefaultIcon, getPropertyPrefix, installListeners, paintFocus, uninstallListeners
-
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
getTextShiftOffset, paintIcon
-
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, installKeyboardActions, paintButtonPressed, paintFocus, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
-
-
-
Field Detail
-
iconTextGap
protected int iconTextGap
-
disabledText
protected Color disabledText
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUI
in classBasicButtonUI
-
uninstallUI
public void uninstallUI(JComponent c)
- Overrides:
uninstallUI
in classBasicButtonUI
-
installDefaults
public void installDefaults(AbstractButton b)
- Overrides:
installDefaults
in classBasicRadioButtonUI
-
uninstallDefaults
protected void uninstallDefaults(AbstractButton b)
- Overrides:
uninstallDefaults
in classBasicRadioButtonUI
-
createButtonListener
protected BasicButtonListener createButtonListener(AbstractButton b)
- Overrides:
createButtonListener
in classBasicButtonUI
-
propertyChange
protected void propertyChange(AbstractButton b, PropertyChangeEvent e)
- Since:
- 2
-
installStyle
protected void installStyle(AbstractButton b)
- Since:
- 2
-
applyStyle
protected void applyStyle(AbstractButton b, Object style)
- Since:
- 2
-
applyStyleProperty
protected Object applyStyleProperty(AbstractButton b, String key, Object value)
- Since:
- 2
-
getStyleableInfos
public Map<String,Class<?>> getStyleableInfos(JComponent c)
- Specified by:
getStyleableInfos
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValue
in interfaceFlatStylingSupport.StyleableUI
- Since:
- 2.5
-
getPreferredSize
public Dimension getPreferredSize(JComponent c)
- Overrides:
getPreferredSize
in classBasicRadioButtonUI
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paint
in classBasicRadioButtonUI
-
paintText
protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
- Overrides:
paintText
in classBasicButtonUI
-
-