public class MetalToggleButtonUI extends BasicToggleButtonUI
Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.
| Modifier and Type | Field and Description |
|---|---|
protected Color |
disabledTextColor
|
protected Color |
focusColor
|
protected Color |
selectColor
|
defaultTextIconGap, defaultTextShiftOffset| Constructor and Description |
|---|
MetalToggleButtonUI()
|
| Modifier and Type | Method and Description |
|---|---|
static ComponentUI |
createUI(JComponent
|
protected Color |
getDisabledTextColor()
|
protected Color |
getFocusColor()
|
protected Color |
getSelectColor()
|
void |
installDefaults(AbstractButton
|
protected void |
paintButtonPressed(Graphics
|
protected void |
paintFocus(Graphics
|
protected void |
paintIcon(Graphics
Paints the appropriate icon of the button
b in the space
iconRect.
|
protected void |
paintText(Graphics
As of Java 2 platform v 1.4 this method should not be used or overriden.
|
protected void |
uninstallDefaults(AbstractButton
|
void |
update(Graphics
If necessary paints the background of the component, then invokes
paint.
|
getPropertyPrefix, getTextShiftOffset, paintclearTextShiftOffset, createButtonListener, getBaseline, getBaselineResizeBehavior, getDefaultTextIconGap, getMaximumSize, getMinimumSize, getPreferredSize, installKeyboardActions, installListeners, installUI, paintIcon, paintText, setTextShiftOffset, uninstallKeyboardActions, uninstallListeners, uninstallUIcontains, getAccessibleChild, getAccessibleChildrenCountprotected ColorfocusColor
protected ColorselectColor
protected ColordisabledTextColor
public static ComponentUIcreateUI(JComponent b)
public void installDefaults(AbstractButtonb)
protected void uninstallDefaults(AbstractButtonb)
protected ColorgetSelectColor()
protected ColorgetDisabledTextColor()
protected ColorgetFocusColor()
public void update(Graphicsg, JComponent c)
paint.
update in class
ComponentUI
g - Graphics to paint to
c - JComponent painting on
NullPointerException - if
g or
c is null
ComponentUI.update(java.awt.Graphics, javax.swing.JComponent) ,
ComponentUI.paint(java.awt.Graphics, javax.swing.JComponent)
protected void paintButtonPressed(Graphicsg, AbstractButton b)
protected void paintText(Graphicsg, JComponent c, Rectangle textRect, String text)
BasicButtonUI
protected void paintFocus(Graphicsg, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
protected void paintIcon(Graphicsg, AbstractButton b, Rectangle iconRect)
b in the space
iconRect.
paintIcon in class
BasicToggleButtonUI
g - Graphics to paint to
b - Button to render for
iconRect - space to render in
NullPointerException - if any of the arguments are null.