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 classFlatRadioButtonUI.FlatRadioButtonListener
-
Field Summary
Fields Modifier and Type Field Description protected ColordisabledTextprotected inticonTextGap-
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 protectedFlatRadioButtonUI(boolean shared)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyStyle(AbstractButton b, Object style)protected ObjectapplyStyleProperty(AbstractButton b, String key, Object value)protected BasicButtonListenercreateButtonListener(AbstractButton b)static ComponentUIcreateUI(JComponent c)DimensiongetPreferredSize(JComponent c)Map<String,Class<?>>getStyleableInfos(JComponent c)ObjectgetStyleableValue(JComponent c, String key)voidinstallDefaults(AbstractButton b)protected voidinstallStyle(AbstractButton b)voidinstallUI(JComponent c)voidpaint(Graphics g, JComponent c)protected voidpaintText(Graphics g, AbstractButton b, Rectangle textRect, String text)protected voidpropertyChange(AbstractButton b, PropertyChangeEvent e)protected voiduninstallDefaults(AbstractButton b)voiduninstallUI(JComponent c)-
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, getBaseline, 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 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:
installUIin classBasicButtonUI
-
uninstallUI
public void uninstallUI(JComponent c)
- Overrides:
uninstallUIin classBasicButtonUI
-
installDefaults
public void installDefaults(AbstractButton b)
- Overrides:
installDefaultsin classBasicRadioButtonUI
-
uninstallDefaults
protected void uninstallDefaults(AbstractButton b)
- Overrides:
uninstallDefaultsin classBasicRadioButtonUI
-
createButtonListener
protected BasicButtonListener createButtonListener(AbstractButton b)
- Overrides:
createButtonListenerin 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:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Since:
- 2
-
getStyleableValue
public Object getStyleableValue(JComponent c, String key)
- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableUI- Since:
- 2.5
-
getPreferredSize
public Dimension getPreferredSize(JComponent c)
- Overrides:
getPreferredSizein classBasicRadioButtonUI
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paintin classBasicRadioButtonUI
-
paintText
protected void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
- Overrides:
paintTextin classBasicButtonUI
-
-