- 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
-
- 已知直接子类:
-
BasicCheckBoxUI,MetalRadioButtonUI
public class BasicRadioButtonUI extends BasicToggleButtonUI
BasicRadioButtonUI的RadioButtonUI实现
-
-
Field Summary
Fields Modifier and Type Field 描述 protected Iconicon图标。-
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
-
-
构造方法摘要
构造方法 Constructor 描述 BasicRadioButtonUI()
-
方法摘要
所有方法 静态方法 接口方法 具体的方法 Modifier and Type 方法 描述 static ComponentUIcreateUI(JComponent b)返回一个BasicRadioButtonUI的实例。IcongetDefaultIcon()返回默认图标。DimensiongetPreferredSize(JComponent c)单选按钮的首选大小protected StringgetPropertyPrefix()返回属性前缀。protected voidinstallDefaults(AbstractButton b)安装默认属性。protected voidinstallListeners(AbstractButton button)注册听众。voidpaint(Graphics g, JComponent c)画单选按钮protected voidpaintFocus(Graphics g, Rectangle textRect, Dimension size)油漆聚焦单选按钮。protected voiduninstallDefaults(AbstractButton b)卸载默认属性。protected voiduninstallListeners(AbstractButton button)取消注册听众。-
Methods inherited from class javax.swing.plaf.basic.BasicButtonUI
clearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, installKeyboardActions, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallUI
-
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
getTextShiftOffset, paintIcon
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
-
-
-
字段详细信息
-
icon
protected Icon icon
图标。
-
-
方法详细信息
-
createUI
public static ComponentUI createUI(JComponent b)
返回一个BasicRadioButtonUI的实例。- 参数
-
b- 一个组件 - 结果
-
一个
BasicRadioButtonUI的实例
-
getPropertyPrefix
protected String getPropertyPrefix()
描述从类复制:BasicButtonUI返回属性前缀。- 重写:
-
getPropertyPrefix在BasicToggleButtonUI - 结果
- 属性前缀
-
installDefaults
protected void installDefaults(AbstractButton b)
描述从类复制:BasicButtonUI安装默认属性。- 重写:
-
installDefaults在BasicButtonUI - 参数
-
b- 一个抽象按钮
-
uninstallDefaults
protected void uninstallDefaults(AbstractButton b)
描述从类复制:BasicButtonUI卸载默认属性。- 重写:
-
uninstallDefaults在BasicButtonUI - 参数
-
b- 一个抽象按钮
-
getDefaultIcon
public Icon getDefaultIcon()
返回默认图标。- 结果
- 默认图标
-
installListeners
protected void installListeners(AbstractButton button)
描述从类别复制:BasicButtonUI注册听众。- 重写:
-
installListeners在BasicButtonUI - 参数
-
button- 一个抽象按钮
-
uninstallListeners
protected void uninstallListeners(AbstractButton button)
说明从类别复制:BasicButtonUI取消注册听众。- 重写:
-
uninstallListeners中的BasicButtonUI - 参数
-
button- 一个抽象按钮
-
paint
public void paint(Graphics g, JComponent c)
画单选按钮- 重写:
-
paint在BasicToggleButtonUI - 参数
-
g- 要绘画的Graphics上下文 -
c- 正在涂漆的组件; 这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用 - 另请参见:
-
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
-
paintFocus
protected void paintFocus(Graphics g, Rectangle textRect, Dimension size)
油漆聚焦单选按钮。- 参数
-
g-实例Graphics -
textRect- 界限 -
size- 单选按钮的大小
-
getPreferredSize
public Dimension getPreferredSize(JComponent c)
单选按钮的首选大小- 重写:
-
getPreferredSize在BasicButtonUI - 参数
-
c- 要查询其首选大小的组件; 这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用 - 结果
-
一个
Dimension对象,包含给定组件的首选大小,适合外观和感觉 - 另请参见:
-
JComponent.getPreferredSize(),LayoutManager.preferredLayoutSize(java.awt.Container)
-
-