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 javax.swing.plaf.basic.BasicRadioButtonUI implements FlatStylingSupport.StyleableUI
Provides the Flat LaF UI delegate forJRadioButton.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classFlatRadioButtonUI.AWTPeerMouseExitedFixHack for missing mouse-exited event for java.awt.Checkbox on macOS (to fix hover effect).protected classFlatRadioButtonUI.FlatRadioButtonListener
-
Field Summary
Fields Modifier and Type Field Description private java.awt.ColordefaultBackgroundprivate booleandefaults_initializedprotected java.awt.ColordisabledTextprivate booleaniconSharedprotected inticonTextGapprivate java.util.Map<java.lang.String,java.lang.Object>oldStyleValuesprivate booleansharedprivate static java.awt.InsetstempInsets
-
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(javax.swing.AbstractButton b, java.lang.Object style)protected java.lang.ObjectapplyStyleProperty(javax.swing.AbstractButton b, java.lang.String key, java.lang.Object value)protected javax.swing.plaf.basic.BasicButtonListenercreateButtonListener(javax.swing.AbstractButton b)static javax.swing.plaf.ComponentUIcreateUI(javax.swing.JComponent c)intgetBaseline(javax.swing.JComponent c, int width, int height)private java.awt.ColorgetDefaultBackground(javax.swing.JComponent c)Returns the default background color of the component.private intgetIconFocusWidth(javax.swing.JComponent c)java.awt.DimensiongetPreferredSize(javax.swing.JComponent c)java.util.Map<java.lang.String,java.lang.Class<?>>getStyleableInfos(javax.swing.JComponent c)java.lang.ObjectgetStyleableValue(javax.swing.JComponent c, java.lang.String key)(package private) java.lang.StringgetStyleType()voidinstallDefaults(javax.swing.AbstractButton b)protected voidinstallStyle(javax.swing.AbstractButton b)voidinstallUI(javax.swing.JComponent c)private voidinstallUIImpl(javax.swing.JComponent c)voidpaint(java.awt.Graphics g, javax.swing.JComponent c)protected voidpaintText(java.awt.Graphics g, javax.swing.AbstractButton b, java.awt.Rectangle textRect, java.lang.String text)protected voidpropertyChange(javax.swing.AbstractButton b, java.beans.PropertyChangeEvent e)protected voiduninstallDefaults(javax.swing.AbstractButton b)voiduninstallUI(javax.swing.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, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, installKeyboardActions, installListeners, paintButtonPressed, paintFocus, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners
-
-
-
-
Field Detail
-
iconTextGap
protected int iconTextGap
-
disabledText
protected java.awt.Color disabledText
-
defaultBackground
private java.awt.Color defaultBackground
-
shared
private final boolean shared
-
iconShared
private boolean iconShared
-
defaults_initialized
private boolean defaults_initialized
-
oldStyleValues
private java.util.Map<java.lang.String,java.lang.Object> oldStyleValues
-
tempInsets
private static final java.awt.Insets tempInsets
-
-
Method Detail
-
createUI
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
-
installUI
public void installUI(javax.swing.JComponent c)
- Overrides:
installUIin classjavax.swing.plaf.basic.BasicButtonUI
-
installUIImpl
private void installUIImpl(javax.swing.JComponent c)
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUIin classjavax.swing.plaf.basic.BasicButtonUI
-
installDefaults
public void installDefaults(javax.swing.AbstractButton b)
- Overrides:
installDefaultsin classjavax.swing.plaf.basic.BasicRadioButtonUI
-
uninstallDefaults
protected void uninstallDefaults(javax.swing.AbstractButton b)
- Overrides:
uninstallDefaultsin classjavax.swing.plaf.basic.BasicRadioButtonUI
-
createButtonListener
protected javax.swing.plaf.basic.BasicButtonListener createButtonListener(javax.swing.AbstractButton b)
- Overrides:
createButtonListenerin classjavax.swing.plaf.basic.BasicButtonUI
-
propertyChange
protected void propertyChange(javax.swing.AbstractButton b, java.beans.PropertyChangeEvent e)- Since:
- 2
-
installStyle
protected void installStyle(javax.swing.AbstractButton b)
- Since:
- 2
-
getStyleType
java.lang.String getStyleType()
- Since:
- 2
-
applyStyle
protected void applyStyle(javax.swing.AbstractButton b, java.lang.Object style)- Since:
- 2
-
applyStyleProperty
protected java.lang.Object applyStyleProperty(javax.swing.AbstractButton b, java.lang.String key, java.lang.Object value)- Since:
- 2
-
getStyleableInfos
public java.util.Map<java.lang.String,java.lang.Class<?>> getStyleableInfos(javax.swing.JComponent c)
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableUI- Since:
- 2
-
getStyleableValue
public java.lang.Object getStyleableValue(javax.swing.JComponent c, java.lang.String key)- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableUI- Since:
- 2.5
-
getPreferredSize
public java.awt.Dimension getPreferredSize(javax.swing.JComponent c)
- Overrides:
getPreferredSizein classjavax.swing.plaf.basic.BasicRadioButtonUI
-
paint
public void paint(java.awt.Graphics g, javax.swing.JComponent c)- Overrides:
paintin classjavax.swing.plaf.basic.BasicRadioButtonUI
-
paintText
protected void paintText(java.awt.Graphics g, javax.swing.AbstractButton b, java.awt.Rectangle textRect, java.lang.String text)- Overrides:
paintTextin classjavax.swing.plaf.basic.BasicButtonUI
-
getDefaultBackground
private java.awt.Color getDefaultBackground(javax.swing.JComponent c)
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
private int getIconFocusWidth(javax.swing.JComponent c)
-
getBaseline
public int getBaseline(javax.swing.JComponent c, int width, int height)- Overrides:
getBaselinein classjavax.swing.plaf.basic.BasicButtonUI
-
-