Class DateValidator

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.FocusListener, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.DocumentListener

    public class DateValidator
    extends AbstractTextComponentValidator
    Validates dates entered as text in a JTextComponent. Validates the input on the fly and gives feedback about whether the date is valid or not. Dates can be entered in one of four standard formats defined for the current locale.
    Since:
    11326 (extracted from AdvancedChangesetQueryPanel)
    • Constructor Detail

      • DateValidator

        public DateValidator​(javax.swing.text.JTextComponent tc)
        Constructs a new DateValidator for the given text component.
        Parameters:
        tc - text component
    • Method Detail

      • decorate

        public static DateValidator decorate​(javax.swing.text.JTextComponent tc)
        Decorates the given text component.
        Parameters:
        tc - text component to decorate
        Returns:
        new date validator attached to tc
      • getStandardTooltipTextAsHtml

        public java.lang.String getStandardTooltipTextAsHtml()
        Returns the standard tooltip text as HTML.
        Returns:
        the standard tooltip text as HTML
      • getStandardTooltipText

        public java.lang.String getStandardTooltipText()
        Returns the standard tooltip text.
        Returns:
        the standard tooltip text
      • getDate

        public java.time.LocalDate getDate()
        Returns the date.
        Returns:
        the date