public class

WindowsButtonUI

extends BasicButtonUI
java.lang.Object
   ↳ javax.swing.plaf.ComponentUI
     ↳ javax.swing.plaf.ButtonUI
       ↳ javax.swing.plaf.basic.BasicButtonUI
         ↳ com.sun.java.swing.plaf.windows.WindowsButtonUI

Class Overview

Windows button.

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. A future release of Swing will provide support for long term persistence.

Summary

Fields
protected int dashedRectGapHeight
protected int dashedRectGapWidth
protected int dashedRectGapX
protected int dashedRectGapY
protected Color focusColor
[Expand]
Inherited Fields
From class javax.swing.plaf.basic.BasicButtonUI
Public Constructors
WindowsButtonUI()
Public Methods
static ComponentUI createUI(JComponent c)
Dimension getPreferredSize(JComponent c)
Returns the specified component's preferred size appropriate for the look and feel.
void paint(Graphics g, JComponent c)
Paints the specified component appropriate for the look and feel.
Protected Methods
Color getFocusColor()
void installDefaults(AbstractButton b)
void paintButtonPressed(Graphics g, AbstractButton b)
void paintFocus(Graphics g, AbstractButton b, Rectangle viewRect, Rectangle textRect, Rectangle iconRect)
void paintText(Graphics g, AbstractButton b, Rectangle textRect, String text)
Overridden method to render the text without the mnemonic
void uninstallDefaults(AbstractButton b)
[Expand]
Inherited Methods
From class javax.swing.plaf.basic.BasicButtonUI
From class javax.swing.plaf.ComponentUI
From class java.lang.Object

Fields

protected int dashedRectGapHeight

protected int dashedRectGapWidth

protected int dashedRectGapX

protected int dashedRectGapY

protected Color focusColor

Public Constructors

public WindowsButtonUI ()

Public Methods

public static ComponentUI createUI (JComponent c)

public Dimension getPreferredSize (JComponent c)

Returns the specified component's preferred size appropriate for the look and feel. If null is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns null.

Parameters
c the component whose preferred size is being queried; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components

public void paint (Graphics g, JComponent c)

Paints the specified component appropriate for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.

Parameters
g the Graphics context in which to paint
c the component being painted; this argument is often ignored, but might be used if the UI object is stateless and shared by multiple components

Protected Methods

protected Color getFocusColor ()

protected 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, AbstractButton b, Rectangle textRect, String text)

Overridden method to render the text without the mnemonic

Parameters
g Graphics context
b Current button to render
textRect Bounding rectangle to render the text.
text String to render

protected void uninstallDefaults (AbstractButton b)