Class ShadowBorder

    • Constructor Detail

      • ShadowBorder

        public ShadowBorder()
    • Method Detail

      • getBorderInsets

        public Insets getBorderInsets​(Component c)
        Returns the insets used by this border.

        This border uses one pixel on the top and left side, and 4 pixels on the bottom and right side.

        Specified by:
        getBorderInsets in interface Border
        Overrides:
        getBorderInsets in class AbstractBorder
        Parameters:
        c - the component for which this border insets value applies
        Returns:
        the insets object initialized to (1,1,4,4)
      • paintBorder

        public void paintBorder​(Component c,
                                Graphics g,
                                int x,
                                int y,
                                int width,
                                int height)
        Paints this border with a one pixel wide line on the top and left side, and a fading shadow on the bottom and right side.
        Specified by:
        paintBorder in interface Border
        Overrides:
        paintBorder in class AbstractBorder
        Parameters:
        c - the component for which this border is being painted
        g - the paint graphics
        x - the x position of the painted border
        y - the y position of the painted border
        width - the width of the painted border
        height - the height of the painted border