所有类
javax.swing.plaf.metal
类 MetalToggleButtonUI
java.lang.Object
javax.swing.plaf.ComponentUI
javax.swing.plaf.ButtonUI
javax.swing.plaf.basic.BasicButtonUI
javax.swing.plaf.basic.BasicToggleButtonUI
javax.swing.plaf.metal.MetalToggleButtonUI
public class MetalToggleButtonUI
- extends BasicToggleButtonUI
MetalToggleButton 实现
警告:此类的已序列化对象与以后的 Swing 版本不兼容。当前序列化支持适用于短期存储或运行相同 Swing 版本的应用程序之间的 RMI。从 1.4 版本开始,已在 java.beans
包中添加了支持所有 JavaBeansTM 长期存储的功能。请参见 XMLEncoder
。
方法摘要 |
---|
static ComponentUI | createUI(JComponent b) |
protected Color | getDisabledTextColor() |
protected Color | getFocusColor() |
protected Color | getSelectColor() |
void | installDefaults(AbstractButton b) |
protected void | paintButtonPressed(Graphics g, AbstractButton b) |
protected void | paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect) |
protected void | paintIcon(Graphics g, AbstractButton b, Rectangle iconRect) 在空间 iconRect 中绘制按钮 b 的适当图标。 |
protected void | paintText(Graphics g, JComponent c, Rectangle textRect, String text) 从 Java 2 平台 v 1.4 开始,不应再使用或重写此方法。 |
protected void | uninstallDefaults(AbstractButton b) |
void | update(Graphics g, JComponent c) 如果必要,绘制组件的背景,然后调用 paint 。 |
从类 javax.swing.plaf.basic.BasicButtonUI 继承的方法 |
---|
clearTextShiftOffset, createButtonListener, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
focusColor
protected Color focusColor
selectColor
protected Color selectColor
disabledTextColor
protected Color disabledTextColor
MetalToggleButtonUI
public MetalToggleButtonUI()
createUI
public static ComponentUI createUI(JComponent b)
installDefaults
public void installDefaults(AbstractButton b)
- 覆盖:
- 类
BasicButtonUI
中的 installDefaults
uninstallDefaults
protected void uninstallDefaults(AbstractButton b)
- 覆盖:
- 类
BasicButtonUI
中的 uninstallDefaults
getSelectColor
protected Color getSelectColor()
getDisabledTextColor
protected Color getDisabledTextColor()