Class GlowBorder

  • All Implemented Interfaces:
    javax.swing.border.Border

    public class GlowBorder
    extends java.lang.Object
    implements javax.swing.border.Border
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.awt.Color inner
      Inner color.
      protected java.awt.Insets insets
      Border insets.
      protected java.awt.Color outer
      Outer color.
    • Constructor Summary

      Constructors 
      Constructor Description
      GlowBorder​(int top, int left, int bottom, int right)
      Create border.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Insets getBorderInsets​(java.awt.Component c)  
      boolean isBorderOpaque()  
      void paintBorder​(java.awt.Component c, java.awt.Graphics gg, int xx, int yy, int width, int height)  
      void setInnerColor​(java.awt.Color inner)
      Sets inner color.
      void setInnerColorTransparent()
      Sets inner color to a transparent version of the outer color.
      void setOuterColor​(java.awt.Color outer)
      Sets outer color.
      void setOuterColorTransparent()
      Sets outer color to a transparent version of the inner color.
      • Methods inherited from class java.lang.Object

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

      • insets

        protected java.awt.Insets insets
        Border insets.
      • inner

        protected java.awt.Color inner
        Inner color.
      • outer

        protected java.awt.Color outer
        Outer color.
    • Constructor Detail

      • GlowBorder

        public GlowBorder​(int top,
                          int left,
                          int bottom,
                          int right)
        Create border.
    • Method Detail

      • setInnerColor

        public void setInnerColor​(java.awt.Color inner)
        Sets inner color.
        Parameters:
        inner - Inner color.
      • setOuterColor

        public void setOuterColor​(java.awt.Color outer)
        Sets outer color.
        Parameters:
        outer - Outer color.
      • setOuterColorTransparent

        public void setOuterColorTransparent()
        Sets outer color to a transparent version of the inner color.
      • setInnerColorTransparent

        public void setInnerColorTransparent()
        Sets inner color to a transparent version of the outer color.
      • paintBorder

        public void paintBorder​(java.awt.Component c,
                                java.awt.Graphics gg,
                                int xx,
                                int yy,
                                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