Class FlatLineBorder

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.border.Border, javax.swing.plaf.UIResource
    Direct Known Subclasses:
    FlatListCellBorder, FlatPopupMenuBorder, FlatTableCellBorder

    public class FlatLineBorder
    extends FlatEmptyBorder
    Line border for various components. Paints a scaled (usually 1px thick) line around the component. The line thickness is not added to the border insets. The insets should be at least have line thickness (usually 1,1,1,1).
    See Also:
    Serialized Form
    • Field Summary

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

        bottom, left, right, top
    • Constructor Summary

      Constructors 
      Constructor Description
      FlatLineBorder​(java.awt.Insets insets, java.awt.Color lineColor)  
      FlatLineBorder​(java.awt.Insets insets, java.awt.Color lineColor, float lineThickness)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Color getLineColor()  
      float getLineThickness()  
      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

      • FlatLineBorder

        public FlatLineBorder​(java.awt.Insets insets,
                              java.awt.Color lineColor)
      • FlatLineBorder

        public FlatLineBorder​(java.awt.Insets insets,
                              java.awt.Color lineColor,
                              float lineThickness)
    • Method Detail

      • getLineColor

        public java.awt.Color getLineColor()
      • getLineThickness

        public float getLineThickness()
      • 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