Class DropShadowBorder

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

    public class DropShadowBorder
    extends java.lang.Object
    implements javax.swing.border.Border, java.io.Serializable
    Implements a DropShadow for components. In general, the DropShadowBorder will work with any rectangular components that do not have a default border installed as part of the look and feel, or otherwise. For example, DropShadowBorder works wonderfully with JPanel, but horribly with JComboBox.

    Note: DropShadowBorder should usually be added to non-opaque components, otherwise the background is likely to bleed through.

    See Also:
    Serialized Form
    • Constructor Detail

      • DropShadowBorder

        public DropShadowBorder()
      • DropShadowBorder

        public DropShadowBorder​(java.awt.Color shadowColor,
                                int shadowSize)
      • DropShadowBorder

        public DropShadowBorder​(boolean showLeftShadow)
      • DropShadowBorder

        public DropShadowBorder​(java.awt.Color shadowColor,
                                int shadowSize,
                                float shadowOpacity,
                                int cornerSize,
                                boolean showTopShadow,
                                boolean showLeftShadow,
                                boolean showBottomShadow,
                                boolean showRightShadow)
    • Method Detail

      • paintBorder

        public void paintBorder​(java.awt.Component c,
                                java.awt.Graphics graphics,
                                int x,
                                int y,
                                int width,
                                int height)
        Specified by:
        paintBorder in interface javax.swing.border.Border
      • getBorderInsets

        public java.awt.Insets getBorderInsets​(java.awt.Component c)
        Specified by:
        getBorderInsets in interface javax.swing.border.Border
      • isBorderOpaque

        public boolean isBorderOpaque()
        Specified by:
        isBorderOpaque in interface javax.swing.border.Border
      • isShowTopShadow

        public boolean isShowTopShadow()
      • isShowLeftShadow

        public boolean isShowLeftShadow()
      • isShowRightShadow

        public boolean isShowRightShadow()
      • isShowBottomShadow

        public boolean isShowBottomShadow()
      • getShadowSize

        public int getShadowSize()
      • getShadowColor

        public java.awt.Color getShadowColor()
      • getShadowOpacity

        public float getShadowOpacity()
      • getCornerSize

        public int getCornerSize()