public class MetalButtonUI extends BasicButtonUI
警告:序列化该类的对象与以后的Swing版本不兼容。当前的序列化支持适用于短期贮藏或RMI运行相同Swing版本的应用程序之间。为1.4,为所有JavaBeans™长期存储的支持已被添加到java.beans
包。请看XMLEncoder
。
Modifier and Type | Field and Description |
---|---|
protected Color |
disabledTextColor |
protected Color |
focusColor |
protected Color |
selectColor |
defaultTextIconGap, defaultTextShiftOffset
Constructor and Description |
---|
MetalButtonUI() |
Modifier and Type | Method and Description |
---|---|
protected BasicButtonListener |
createButtonListener(AbstractButton b) |
static ComponentUI |
createUI(JComponent c) |
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 |
paintText(Graphics g, JComponent c, Rectangle textRect, String text)
作为java 2平台V 1.4,该方法不使用或修改。
|
void |
uninstallDefaults(AbstractButton b) |
void |
update(Graphics g, JComponent c)
如果需要油漆的组件的背景,然后调用
paint 。
|
clearTextShiftOffset, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, getPropertyPrefix, getTextShiftOffset, installKeyboardActions, installListeners, installUI, paint, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUI
contains, getAccessibleChild, getAccessibleChildrenCount
protected Color focusColor
protected Color selectColor
protected Color disabledTextColor
public static ComponentUI createUI(JComponent c)
public void installDefaults(AbstractButton b)
installDefaults
方法重写,继承类
BasicButtonUI
public void uninstallDefaults(AbstractButton b)
uninstallDefaults
方法重写,继承类
BasicButtonUI
protected BasicButtonListener createButtonListener(AbstractButton b)
createButtonListener
方法重写,继承类
BasicButtonUI
protected Color getSelectColor()
protected Color getDisabledTextColor()
protected Color getFocusColor()
public void update(Graphics g, JComponent c)
paint
。
update
方法重写,继承类
ComponentUI
g
图形绘
c
- JComponent绘画
NullPointerException
-如果
g
或
c
是空的
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
,
ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
protected void paintButtonPressed(Graphics g, AbstractButton b)
paintButtonPressed
方法重写,继承类
BasicButtonUI
protected void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
paintFocus
方法重写,继承类
BasicButtonUI
protected void paintText(Graphics g, JComponent c, Rectangle textRect, String text)
BasicButtonUI
paintText
方法重写,继承类
BasicButtonUI
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.