Class FlatDropShadowBorder

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.border.Border, javax.swing.plaf.UIResource

    public class FlatDropShadowBorder
    extends FlatEmptyBorder
    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:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.border.EmptyBorder

        bottom, left, right, top
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void paintBorder​(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)  
      • Methods inherited from class javax.swing.border.EmptyBorder

        isBorderOpaque
      • Methods inherited from class javax.swing.border.AbstractBorder

        getBaseline, getBaselineResizeBehavior, getBorderInsets, getInteriorRectangle, getInteriorRectangle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FlatDropShadowBorder

        public FlatDropShadowBorder()
      • FlatDropShadowBorder

        public FlatDropShadowBorder​(java.awt.Color shadowColor)
      • FlatDropShadowBorder

        public FlatDropShadowBorder​(java.awt.Color shadowColor,
                                    int shadowSize,
                                    float shadowOpacity)
      • FlatDropShadowBorder

        public FlatDropShadowBorder​(java.awt.Color shadowColor,
                                    java.awt.Insets shadowInsets,
                                    float shadowOpacity)
    • Method Detail

      • paintBorder

        public void paintBorder​(java.awt.Component c,
                                java.awt.Graphics g,
                                int x,
                                int y,
                                int width,
                                int height)
        Specified by:
        paintBorder in interface javax.swing.border.Border
        Overrides:
        paintBorder in class javax.swing.border.EmptyBorder