- 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
-
- javax.swing.plaf.metal.MetalRadioButtonUI
-
- 已知直接子类:
-
MetalCheckBoxUI
public class MetalRadioButtonUI extends BasicRadioButtonUI
MetalBadtonButtonUI的RadioButtonUI实现警告:此类的序列化对象与将来的Swing版本不兼容。 当前的序列化支持适用于运行相同版本的Swing的应用程序之间的短期存储或RMI。 从1.4开始,支持所有JavaBeans的长期存储已被添加到
java.beans包中。 请参阅XMLEncoder。
-
-
Field Summary
Fields Modifier and Type Field 描述 protected ColordisabledTextColor禁用文字的颜色。protected ColorfocusColor聚焦单选按钮的颜色。protected ColorselectColor所选单选按钮的颜色。-
Fields inherited from class javax.swing.plaf.basic.BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
-
Fields inherited from class javax.swing.plaf.basic.BasicRadioButtonUI
icon
-
-
构造方法摘要
构造方法 Constructor 描述 MetalRadioButtonUI()
-
方法摘要
所有方法 静态方法 接口方法 具体的方法 Modifier and Type 方法 描述 static ComponentUIcreateUI(JComponent c)返回一个MetalRadioButtonUI的实例。protected ColorgetDisabledTextColor()返回禁用文字的颜色。protected ColorgetFocusColor()返回聚焦的颜色JRadioButton。protected ColorgetSelectColor()返回所选JRadioButton的颜色。voidinstallDefaults(AbstractButton b)安装默认属性。voidpaint(Graphics g, JComponent c)画单选按钮protected voidpaintFocus(Graphics g, Rectangle t, Dimension d)油漆聚焦单选按钮。protected voiduninstallDefaults(AbstractButton b)卸载默认属性。-
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.BasicRadioButtonUI
getDefaultIcon, getPreferredSize, getPropertyPrefix, installListeners, uninstallListeners
-
Methods inherited from class javax.swing.plaf.basic.BasicToggleButtonUI
getTextShiftOffset, paintIcon
-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
-
-
-
-
方法详细信息
-
createUI
public static ComponentUI createUI(JComponent c)
返回一个MetalRadioButtonUI的实例。- 参数
-
c- 一个组件 - 结果
-
一个
MetalRadioButtonUI
-
installDefaults
public void installDefaults(AbstractButton b)
描述从类复制:BasicButtonUI安装默认属性。- 重写:
-
installDefaults在BasicRadioButtonUI - 参数
-
b- 一个抽象的按钮
-
uninstallDefaults
protected void uninstallDefaults(AbstractButton b)
描述从类复制:BasicButtonUI卸载默认属性。- 重写:
-
uninstallDefaults在BasicRadioButtonUI - 参数
-
b- 一个抽象按钮
-
getSelectColor
protected Color getSelectColor()
返回所选JRadioButton的颜色。- 结果
-
所选颜色
JRadioButton
-
getDisabledTextColor
protected Color getDisabledTextColor()
返回禁用文字的颜色。- 结果
- 禁用文字的颜色
-
getFocusColor
protected Color getFocusColor()
返回聚焦的颜色JRadioButton。- 结果
-
颜色聚焦
JRadioButton
-
paint
public void paint(Graphics g, JComponent c)
描述从类复制:BasicRadioButtonUI画单选按钮- 重写:
-
paint在BasicRadioButtonUI - 参数
-
g- 要绘画的Graphics上下文 -
c- 正在涂漆的部件 这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用 - 另请参见:
-
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
-
paintFocus
protected void paintFocus(Graphics g, Rectangle t, Dimension d)
描述从类复制:BasicRadioButtonUI油漆聚焦单选按钮。- 重写:
-
paintFocus在BasicRadioButtonUI - 参数
-
g-实例Graphics -
t- 界限 -
d- 单选按钮的大小
-
-