public class ShadowBorder
extends javax.swing.border.AbstractBorder
| Constructor and Description |
|---|
ShadowBorder()
Constructor.
|
ShadowBorder(int width)
Constructor.
|
ShadowBorder(int width,
java.awt.Color color)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.awt.Insets |
getBorderInsets(java.awt.Component c)
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 ShadowBorder'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 ShadowBorder()
public ShadowBorder(int width)
width - the width of the shadow.public ShadowBorder(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 ShadowBorder'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