public class

MetalButtonUI

extends BasicButtonUI
java.lang.Object
   ↳ javax.swing.plaf.ComponentUI
     ↳ javax.swing.plaf.ButtonUI
       ↳ javax.swing.plaf.basic.BasicButtonUI
         ↳ javax.swing.plaf.metal.MetalButtonUI

Class Overview

MetalButtonUI 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
MetalButtonUI()
Public Methods
static ComponentUI createUI(JComponent c)
void installDefaults(AbstractButton b)
void uninstallDefaults(AbstractButton b)
void update(Graphics g, JComponent c)
If necessary paints the background of the component, then invokes paint.
Protected Methods
BasicButtonListener createButtonListener(AbstractButton b)
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 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.
[Expand]
Inherited Methods
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 MetalButtonUI ()

Public Methods

public static ComponentUI createUI (JComponent c)

public void installDefaults (AbstractButton b)

public void uninstallDefaults (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 BasicButtonListener createButtonListener (AbstractButton b)

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 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.