public class

MetalToggleButtonUI

extends BasicToggleButtonUI
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

Class Overview

MetalToggleButton implementation

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 JavaBeansTM has been added to the java.beans package. Please see XMLEncoder.

Summary

Fields
protected Color disabledTextColor
protected Color focusColor
protected Color selectColor
[Expand]
Inherited Fields
From class javax.swing.plaf.basic.BasicButtonUI
Public Constructors
MetalToggleButtonUI()
Public Methods
static ComponentUI createUI(JComponent b)
void installDefaults(AbstractButton b)
void update(Graphics g, JComponent c)
If necessary paints the background of the component, then invokes paint.
Protected Methods
Color getDisabledTextColor()
Color getFocusColor()
Color getSelectColor()
void paintButtonPressed(Graphics g, AbstractButton b)
void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
void paintIcon(Graphics g, AbstractButton b, Rectangle iconRect)
Paints the appropriate icon of the button b in the space iconRect.
void paintText(Graphics g, JComponent c, Rectangle textRect, String text)
As of Java 2 platform v 1.4 this method should not be used or overriden.
void uninstallDefaults(AbstractButton b)
[Expand]
Inherited Methods
From class javax.swing.plaf.basic.BasicToggleButtonUI
From class javax.swing.plaf.basic.BasicButtonUI
From class javax.swing.plaf.ComponentUI
From class java.lang.Object

Fields

protected Color disabledTextColor

protected Color focusColor

protected Color selectColor

Public Constructors

public MetalToggleButtonUI ()

Public Methods

public static ComponentUI createUI (JComponent b)

public void installDefaults (AbstractButton b)

public void update (Graphics g, JComponent c)

If necessary paints the background of the component, then invokes paint.

Parameters
g Graphics to paint to
c JComponent painting on
Throws
NullPointerException if g or c is null

Protected Methods

protected Color getDisabledTextColor ()

protected Color getFocusColor ()

protected Color getSelectColor ()

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)

Paints the appropriate icon of the button b in the space iconRect.

Parameters
g Graphics to paint to
b Button to render for
iconRect space to render in
Throws
NullPointerException if any of the arguments are null.

protected void paintText (Graphics g, JComponent c, Rectangle textRect, String text)

As of Java 2 platform v 1.4 this method should not be used or overriden. Use the paintText method which takes the AbstractButton argument.

protected void uninstallDefaults (AbstractButton b)