javax.swing.plaf.basic
Class BasicBorders.RolloverButtonBorder

java.lang.Object
  extended by javax.swing.border.AbstractBorder
      extended by javax.swing.plaf.basic.BasicBorders.ButtonBorder
          extended by javax.swing.plaf.basic.BasicBorders.RolloverButtonBorder
All Implemented Interfaces:
Serializable, Border, UIResource
Enclosing class:
BasicBorders

public static class BasicBorders.RolloverButtonBorder
extends BasicBorders.ButtonBorder

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

Since:
1.4
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.plaf.basic.BasicBorders.ButtonBorder
darkShadow, highlight, lightHighlight, shadow
 
Constructor Summary
BasicBorders.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
 void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
          Paints the border around a rollover button.
 
Methods inherited from class javax.swing.plaf.basic.BasicBorders.ButtonBorder
getBorderInsets, getBorderInsets
 
Methods inherited from class javax.swing.border.AbstractBorder
getInteriorRectangle, getInteriorRectangle, isBorderOpaque
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicBorders.RolloverButtonBorder

public BasicBorders.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 AbstractButton whose model returns true for ButtonModel.isRollover(), nothing gets painted at all.

Specified by:
paintBorder in interface Border
Overrides:
paintBorder in class BasicBorders.ButtonBorder
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.
See Also:
BasicGraphicsUtils.drawBezel(java.awt.Graphics, int, int, int, int, boolean, boolean, java.awt.Color, java.awt.Color, java.awt.Color, java.awt.Color)