BasicCheckBoxUI
, MetalRadioButtonUI
public class BasicRadioButtonUI extends BasicToggleButtonUI
Modifier and Type | Field | Description |
---|---|---|
protected Icon |
icon |
The icon. |
defaultTextIconGap, defaultTextShiftOffset
Constructor | Description |
---|---|
BasicRadioButtonUI() |
Constructs a BasicRadioButtonUI . |
Modifier and Type | Method | Description |
---|---|---|
static ComponentUI |
createUI |
Returns an instance of BasicRadioButtonUI . |
Icon |
getDefaultIcon() |
Returns the default icon. |
Dimension |
getPreferredSize |
The preferred size of the radio button |
void |
paint |
paint the radio button |
protected void |
paintFocus |
Paints focused radio button. |
getTextShiftOffset, paintIcon
clearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getPropertyPrefix, installDefaults, installKeyboardActions, installListeners, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners
contains, getAccessibleChild, getAccessibleChildrenCount, getMaximumSize, getMinimumSize, installUI, uninstallUI, update
protected Icon icon
public BasicRadioButtonUI()
BasicRadioButtonUI
.public static ComponentUI createUI(JComponent b)
BasicRadioButtonUI
.b
- a componentBasicRadioButtonUI
public Icon getDefaultIcon()
public void paint(Graphics g, JComponent c)
paint
in class ComponentUI
g
- the Graphics
context in which to paintc
- the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple componentsprotected void paintFocus(Graphics g, Rectangle textRect, Dimension size)
g
- an instance of Graphics
textRect
- boundssize
- the size of radio buttonpublic Dimension getPreferredSize(JComponent c)
getPreferredSize
in class ComponentUI
c
- the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple componentsDimension
object containing given component's preferred size appropriate for the look and feel
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/plaf/basic/BasicRadioButtonUI.html