public class ShadowBorder extends AbstractBorder
Constructor and Description |
---|
ShadowBorder()
Constructor.
|
ShadowBorder(int width)
Constructor.
|
ShadowBorder(int width,
Color color)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Insets |
getBorderInsets(Component c)
Returns a new Insets instance where the top and left are 1,
the bottom and right fields are the border width + 1.
|
Insets |
getBorderInsets(Component c,
Insets insets)
Reinitializes the
insets parameter with this ShadowBorder's
current Insets. |
boolean |
isBorderOpaque()
This implementation always returns true.
|
void |
paintBorder(Component c,
Graphics g,
int x,
int y,
int width,
int height)
Paints the drop shadow border around the given component.
|
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle
public ShadowBorder()
public ShadowBorder(int width)
width
- the width of the shadow.public ShadowBorder(int width, Color color)
width
- the width of the shadow.color
- the color of the shadow.public Insets getBorderInsets(Component c)
getBorderInsets
in interface Border
getBorderInsets
in class AbstractBorder
c
- the component for which this border insets value appliespublic Insets getBorderInsets(Component c, Insets insets)
insets
parameter with this ShadowBorder's
current Insets.getBorderInsets
in class AbstractBorder
c
- the component for which this border insets value appliesinsets
- the object to be reinitializedinsets
objectpublic boolean isBorderOpaque()
isBorderOpaque
in interface Border
isBorderOpaque
in class AbstractBorder
public void paintBorder(Component c, Graphics g, int x, int y, int width, int height)
paintBorder
in interface Border
paintBorder
in class AbstractBorder
c
- - the component for which this border is being paintedg
- - the paint graphicsx
- - the x position of the painted bordery
- - the y position of the painted borderwidth
- - the width of the painted borderheight
- - the height of the painted borderCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.