javax.swing.plaf.basic
Class BasicBorders.RolloverButtonBorder
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.plaf.basic.BasicBorders.ButtonBorder
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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)