Class UnderlineBorder

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.border.Border
    Direct Known Subclasses:
    UnderlineBorder

    public class UnderlineBorder
    extends javax.swing.border.AbstractBorder
    Underline border that is best used for JLabels. It will underline the text of the component while ignoring the icon element. This can be used for any component really, but the results may be undesirable.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static int DASHED  
      protected static int WAVY  
    • Constructor Summary

      Constructors 
      Constructor Description
      UnderlineBorder​(int style, java.awt.Color color)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static UnderlineBorder dashed​(java.awt.Color color)  
      java.awt.Insets getBorderInsets​(java.awt.Component c)  
      java.awt.Insets getBorderInsets​(java.awt.Component c, java.awt.Insets insets)  
      void paintBorder​(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)  
      void setColor​(java.awt.Color color)  
      static UnderlineBorder wavy​(java.awt.Color color)  
      • Methods inherited from class javax.swing.border.AbstractBorder

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

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

      • UnderlineBorder

        public UnderlineBorder​(int style,
                               java.awt.Color color)
    • Method Detail

      • setColor

        public void setColor​(java.awt.Color color)
      • 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.AbstractBorder
      • getBorderInsets

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

        public java.awt.Insets getBorderInsets​(java.awt.Component c,
                                               java.awt.Insets insets)
        Overrides:
        getBorderInsets in class javax.swing.border.AbstractBorder