public class BasicToggleButtonUI extends BasicButtonUI
defaultTextIconGap, defaultTextShiftOffset
Constructor and Description |
---|
BasicToggleButtonUI() |
Modifier and Type | Method and Description |
---|---|
static ComponentUI |
createUI(JComponent b) |
protected String |
getPropertyPrefix() |
protected int |
getTextShiftOffset()
覆盖,以便文本不会被转换为切换按钮和子类。
|
void |
paint(Graphics g, JComponent c)
适当地涂抹指定的组件的外观和感觉。
|
protected void |
paintIcon(Graphics g, AbstractButton b, Rectangle iconRect) |
clearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, installDefaults, installKeyboardActions, installListeners, installUI, paintButtonPressed, paintFocus, paintIcon, paintText, paintText, setTextShiftOffset, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI
contains, getAccessibleChild, getAccessibleChildrenCount, update
public static ComponentUI createUI(JComponent b)
protected String getPropertyPrefix()
public void paint(Graphics g, JComponent c)
ComponentUI
ComponentUI.update
指定组件正在被绘制时的方法。
子类应该覆盖此方法,并使用指定的Graphics
对象来呈现Graphics
的内容。
paint
在
BasicButtonUI
g
- 要绘画的
Graphics
上下文
c
- 正在涂漆的部件;
这个参数经常被忽略,但如果UI对象是无状态的并且被多个组件共享,则可能会被使用
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent)
protected void paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
protected int getTextShiftOffset()
getTextShiftOffset
in class
BasicButtonUI