Class ValidationBorder

  • All Implemented Interfaces:
    javax.swing.border.Border
    Direct Known Subclasses:
    ValidationTooltipBorder

    public class ValidationBorder
    extends java.lang.Object
    implements javax.swing.border.Border
    A border that indicates a validation error by displaying a red X to the right of the contained component.
    • Constructor Detail

      • ValidationBorder

        public ValidationBorder()
      • ValidationBorder

        public ValidationBorder​(java.awt.Color background)
    • Method Detail

      • 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
      • isValid

        public boolean isValid()
      • setValid

        public void setValid​(boolean valid)
      • 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
      • paintInvalidMarker

        public static void paintInvalidMarker​(java.awt.Component c,
                                              java.awt.Graphics g,
                                              int x,
                                              int y,
                                              int width,
                                              int height)
      • paintInvalidMarker

        public static void paintInvalidMarker​(java.awt.Graphics g,
                                              int x,
                                              int y,
                                              int width,
                                              int height,
                                              int size)
      • getSize

        public static int getSize​(java.awt.Component c,
                                  java.awt.Graphics g,
                                  int height)
      • addToViewport

        public static <C extends javax.swing.JComponent & ValidatedComponent> void addToViewport​(C component)
        Add a ValidationBorder to the JViewport containing component.