public class DropShadowBorder
extends javax.swing.border.AbstractBorder
| Constructor and Description |
|---|
DropShadowBorder()
Drop shadow with default width of 3 pixels and black color.
|
DropShadowBorder(int width)
Drop shadow, default shadow color is black.
|
DropShadowBorder(int width,
java.awt.Color color)
Drop shadow, width and color are adjustable.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.Insets |
getBorderInsets(java.awt.Component c)
This implementation returns a new Insets instance where the top and left are 1,
the bottom and right fields are the border width + 1.
|
java.awt.Insets |
getBorderInsets(java.awt.Component c,
java.awt.Insets insets)
Reinitializes the
insets parameter with this DropShadowBorder's
current Insets. |
boolean |
isBorderOpaque()
This implementation always returns true.
|
void |
paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
Paints the drop shadow border around the given component.
|
public DropShadowBorder()
public DropShadowBorder(int width)
width - the width of the shadow.public DropShadowBorder(int width,
java.awt.Color color)
width - the width of the shadow.color - the color of the shadow.public java.awt.Insets getBorderInsets(java.awt.Component c)
getBorderInsets in interface javax.swing.border.BordergetBorderInsets in class javax.swing.border.AbstractBorderc - the component for which this border insets value appliespublic java.awt.Insets getBorderInsets(java.awt.Component c,
java.awt.Insets insets)
insets parameter with this DropShadowBorder's
current Insets.getBorderInsets in class javax.swing.border.AbstractBorderc - the component for which this border insets value appliesinsets - the object to be reinitializedinsets objectpublic boolean isBorderOpaque()
isBorderOpaque in interface javax.swing.border.BorderisBorderOpaque in class javax.swing.border.AbstractBorderpublic void paintBorder(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
paintBorder in interface javax.swing.border.BorderpaintBorder in class javax.swing.border.AbstractBorderc - - 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 border