Package com.formdev.flatlaf.ui
Class FlatDropShadowBorder
java.lang.Object
javax.swing.border.AbstractBorder
javax.swing.border.EmptyBorder
javax.swing.plaf.BorderUIResource.EmptyBorderUIResource
com.formdev.flatlaf.ui.FlatEmptyBorder
com.formdev.flatlaf.ui.FlatDropShadowBorder
- All Implemented Interfaces:
FlatStylingSupport.StyleableBorder,Serializable,Border,UIResource
public class FlatDropShadowBorder
extends FlatEmptyBorder
implements FlatStylingSupport.StyleableBorder
Paints a drop shadow border around the component.
Supports 1-sided, 2-side, 3-sided or 4-sided drop shadows.
The shadow insets allow specifying drop shadow thickness for each side. A zero or negative value hides the drop shadow on that side. A negative value can be used to indent the drop shadow on corners. E.g. -4 on left indents drop shadow at top-left and bottom-left corners by 4 pixels.
- Author:
- Karl Tauber
- See Also:
-
Field Summary
FieldsFields inherited from class javax.swing.border.EmptyBorder
bottom, left, right, top -
Constructor Summary
ConstructorsConstructorDescriptionFlatDropShadowBorder(Color shadowColor) FlatDropShadowBorder(Color shadowColor, int shadowSize, float shadowOpacity) FlatDropShadowBorder(Color shadowColor, Insets shadowInsets, float shadowOpacity) -
Method Summary
Modifier and TypeMethodDescriptionapplyStyleProperty(String key, Object value) getStyleableValue(String key) voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height) Methods inherited from class com.formdev.flatlaf.ui.FlatEmptyBorder
applyStyleProperty, getBorderInsets, getBorderInsets, getStyleableValue, getUnscaledBorderInsets, scaleInsetsMethods inherited from class javax.swing.border.EmptyBorder
isBorderOpaqueMethods inherited from class javax.swing.border.AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
-
Field Details
-
shadowColor
-
shadowInsets
-
shadowOpacity
protected float shadowOpacity
-
-
Constructor Details
-
FlatDropShadowBorder
public FlatDropShadowBorder() -
FlatDropShadowBorder
-
FlatDropShadowBorder
-
FlatDropShadowBorder
-
-
Method Details
-
applyStyleProperty
- Specified by:
applyStylePropertyin interfaceFlatStylingSupport.StyleableBorder- Since:
- 2
-
getStyleableInfos
- Specified by:
getStyleableInfosin interfaceFlatStylingSupport.StyleableBorder- Since:
- 2
-
getStyleableValue
- Specified by:
getStyleableValuein interfaceFlatStylingSupport.StyleableBorder- Since:
- 2.5
-
paintBorder
- Specified by:
paintBorderin interfaceBorder- Overrides:
paintBorderin classEmptyBorder
-