javax.swing.plaf.basic

Class BasicBorders.RolloverButtonBorder

public static class BasicBorders.RolloverButtonBorder extends BasicBorders.ButtonBorder

A one-pixel thick border for rollover buttons, for example in tool bars.

Since: 1.4

Constructor Summary
RolloverButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Constructs a new border for drawing a roll-over button in the Basic look and feel.
Method Summary
voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border around a rollover button.

Constructor Detail

RolloverButtonBorder

public RolloverButtonBorder(Color shadow, Color darkShadow, Color highlight, Color lightHighlight)
Constructs a new border for drawing a roll-over button in the Basic look and feel.

Parameters: shadow the shadow color. darkShadow a darker variant of the shadow color. highlight the highlight color. lightHighlight a brighter variant of the highlight color.

Method Detail

paintBorder

public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
Paints the border around a rollover button. If c is not an {@link javax.swing.AbstractButton} whose model returns true for {@link javax.swing.ButtonModel#isRollover}, nothing gets painted at all.

Parameters: c the button whose border is to be painted. g the graphics for painting. x the horizontal position for painting the border. y the vertical position for painting the border. width the width of the available area for painting the border. height the height of the available area for painting the border.