BasicRadioButtonUI (Java Platform SE 6) (original) (raw)



javax.swing.plaf.basic

Class BasicRadioButtonUI

java.lang.Object extended by javax.swing.plaf.ComponentUI extended by javax.swing.plaf.ButtonUI extended by javax.swing.plaf.basic.BasicButtonUI extended by javax.swing.plaf.basic.BasicToggleButtonUI extended by javax.swing.plaf.basic.BasicRadioButtonUI

Direct Known Subclasses:

BasicCheckBoxUI, MetalRadioButtonUI


public class BasicRadioButtonUI

extends BasicToggleButtonUI

RadioButtonUI implementation for BasicRadioButtonUI


Field Summary
protected Icon icon
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
Constructor Summary
BasicRadioButtonUI()
Method Summary
static ComponentUI createUI(JComponent b)
Icon getDefaultIcon()
Dimension getPreferredSize(JComponent c) The preferred size of the radio button
protected String getPropertyPrefix()
protected void installDefaults(AbstractButton b)
void [paint](../../../../javax/swing/plaf/basic/BasicRadioButtonUI.html#paint%28java.awt.Graphics, javax.swing.JComponent%29)(Graphics g,JComponent c) paint the radio button
protected void [paintFocus](../../../../javax/swing/plaf/basic/BasicRadioButtonUI.html#paintFocus%28java.awt.Graphics, java.awt.Rectangle, java.awt.Dimension%29)(Graphics g,Rectangle textRect,Dimension size)
protected void uninstallDefaults(AbstractButton b)
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
getTextShiftOffset, [paintIcon](../../../../javax/swing/plaf/basic/BasicToggleButtonUI.html#paintIcon%28java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle%29)
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, [getBaseline](../../../../javax/swing/plaf/basic/BasicButtonUI.html#getBaseline%28javax.swing.JComponent, int, int%29), getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, installKeyboardActions, installListeners, installUI, [paintButtonPressed](../../../../javax/swing/plaf/basic/BasicButtonUI.html#paintButtonPressed%28java.awt.Graphics, javax.swing.AbstractButton%29), [paintFocus](../../../../javax/swing/plaf/basic/BasicButtonUI.html#paintFocus%28java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.awt.Rectangle, java.awt.Rectangle%29), [paintIcon](../../../../javax/swing/plaf/basic/BasicButtonUI.html#paintIcon%28java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle%29), [paintText](../../../../javax/swing/plaf/basic/BasicButtonUI.html#paintText%28java.awt.Graphics, javax.swing.AbstractButton, java.awt.Rectangle, java.lang.String%29), [paintText](../../../../javax/swing/plaf/basic/BasicButtonUI.html#paintText%28java.awt.Graphics, javax.swing.JComponent, java.awt.Rectangle, java.lang.String%29), setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
Methods inherited from class javax.swing.plaf.ComponentUI
[contains](../../../../javax/swing/plaf/ComponentUI.html#contains%28javax.swing.JComponent, int, int%29), [getAccessibleChild](../../../../javax/swing/plaf/ComponentUI.html#getAccessibleChild%28javax.swing.JComponent, int%29), getAccessibleChildrenCount, [update](../../../../javax/swing/plaf/ComponentUI.html#update%28java.awt.Graphics, javax.swing.JComponent%29)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, [wait](../../../../java/lang/Object.html#wait%28long, int%29)
Field Detail

icon

protected Icon icon

Constructor Detail

BasicRadioButtonUI

public BasicRadioButtonUI()

Method Detail

createUI

public static ComponentUI createUI(JComponent b)


getPropertyPrefix

protected String getPropertyPrefix()

Overrides:

[getPropertyPrefix](../../../../javax/swing/plaf/basic/BasicToggleButtonUI.html#getPropertyPrefix%28%29) in class [BasicToggleButtonUI](../../../../javax/swing/plaf/basic/BasicToggleButtonUI.html "class in javax.swing.plaf.basic")


installDefaults

protected void installDefaults(AbstractButton b)

Overrides:

[installDefaults](../../../../javax/swing/plaf/basic/BasicButtonUI.html#installDefaults%28javax.swing.AbstractButton%29) in class [BasicButtonUI](../../../../javax/swing/plaf/basic/BasicButtonUI.html "class in javax.swing.plaf.basic")


uninstallDefaults

protected void uninstallDefaults(AbstractButton b)

Overrides:

[uninstallDefaults](../../../../javax/swing/plaf/basic/BasicButtonUI.html#uninstallDefaults%28javax.swing.AbstractButton%29) in class [BasicButtonUI](../../../../javax/swing/plaf/basic/BasicButtonUI.html "class in javax.swing.plaf.basic")


getDefaultIcon

public Icon getDefaultIcon()


paint

public void paint(Graphics g, JComponent c)

paint the radio button

Overrides:

[paint](../../../../javax/swing/plaf/basic/BasicToggleButtonUI.html#paint%28java.awt.Graphics, javax.swing.JComponent%29) in class [BasicToggleButtonUI](../../../../javax/swing/plaf/basic/BasicToggleButtonUI.html "class in javax.swing.plaf.basic")

Parameters:

g - the Graphics context in which to paint

c - the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components

See Also:

[ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)](../../../../javax/swing/plaf/ComponentUI.html#update%28java.awt.Graphics, javax.swing.JComponent%29)


paintFocus

protected void paintFocus(Graphics g, Rectangle textRect, Dimension size)


getPreferredSize

public Dimension getPreferredSize(JComponent c)

The preferred size of the radio button

Overrides:

[getPreferredSize](../../../../javax/swing/plaf/basic/BasicButtonUI.html#getPreferredSize%28javax.swing.JComponent%29) in class [BasicButtonUI](../../../../javax/swing/plaf/basic/BasicButtonUI.html "class in javax.swing.plaf.basic")

Parameters:

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 components

See Also:

JComponent.getPreferredSize(), LayoutManager.preferredLayoutSize(java.awt.Container)



Submit a bug or feature
For further API reference and developer documentation, see Java SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright © 1993, 2015, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Scripting on this page tracks web page traffic, but does not change the content in any way.