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.StyleableObject, Serializable, Border, UIResource
public class FlatDropShadowBorder
extends FlatEmptyBorder
implements FlatStylingSupport.StyleableObject
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.
- See Also:
-
Field Summary
FieldsFields inherited from class 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) Applies the given value to this object.voidpaintBorder(Component c, Graphics g, int x, int y, int width, int height) Methods inherited from class FlatEmptyBorder
applyStyleProperty, getBorderInsets, getBorderInsets, getStyleableValue, getUnscaledBorderInsets, scaleInsetsMethods inherited from class EmptyBorder
isBorderOpaqueMethods inherited from class AbstractBorder
getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangleMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FlatStylingSupport.StyleableObject
getStyleableInfos, getStyleableValue
-
Field Details
-
shadowColor
-
shadowInsets
-
shadowOpacity
protected float shadowOpacity
-
-
Constructor Details
-
FlatDropShadowBorder
public FlatDropShadowBorder() -
FlatDropShadowBorder
-
FlatDropShadowBorder
-
FlatDropShadowBorder
-
-
Method Details
-
applyStyleProperty
Description copied from interface:FlatStylingSupport.StyleableObjectApplies the given value to this object.The default implementation invokes
FlatStylingSupport.applyToAnnotatedObject(Object, String, Object).- Specified by:
applyStylePropertyin interfaceFlatStylingSupport.StyleableObject- Parameters:
key- the name of the propertyvalue- the new value- Returns:
- the old value of the property
- Since:
- 2
-
paintBorder
- Specified by:
paintBorderin interfaceBorder- Overrides:
paintBorderin classEmptyBorder
-