Package com.jgoodies.looks.common
Class ShadowPopupBorder
java.lang.Object
javax.swing.border.AbstractBorder
com.jgoodies.looks.common.ShadowPopupBorder
- All Implemented Interfaces:
Serializable,Border
A border with a drop shadow intended to be used as the outer border
of popups. Can paint the screen background if used with heavy-weight
popup windows.
- Version:
- $Revision: 1.9 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ShadowPopupBorderThe singleton instance used to draw all borders.private static ImageThe drop shadow is created from a PNG image with 8 bit alpha channel.private static final intThe drop shadow needs 5 pixels at the bottom and the right hand side. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the insets of the border.getBorderInsets(Component c, Insets insets) Reinitializes the insets parameter with this Border's current Insets.static ShadowPopupBorderReturns the singleton instance used to draw all borders.voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height) Paints the border for the specified component with the specified position and size.Methods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getInteriorRectangle, getInteriorRectangle, isBorderOpaque
-
Field Details
-
SHADOW_SIZE
private static final int SHADOW_SIZEThe drop shadow needs 5 pixels at the bottom and the right hand side.- See Also:
-
instance
The singleton instance used to draw all borders. -
shadow
The drop shadow is created from a PNG image with 8 bit alpha channel.
-
-
Constructor Details
-
ShadowPopupBorder
ShadowPopupBorder()
-
-
Method Details
-
getInstance
Returns the singleton instance used to draw all borders. -
paintBorder
Paints the border for the specified component with the specified position and size.- Specified by:
paintBorderin interfaceBorder- Overrides:
paintBorderin classAbstractBorder
-
getBorderInsets
Returns the insets of the border.- Specified by:
getBorderInsetsin interfaceBorder- Overrides:
getBorderInsetsin classAbstractBorder
-
getBorderInsets
Reinitializes the insets parameter with this Border's current Insets.- Overrides:
getBorderInsetsin classAbstractBorder- Parameters:
c- the component for which this border insets value appliesinsets- the object to be reinitialized- Returns:
- the
insetsobject
-