Class TimeValidator

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

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

      • TimeValidator

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

      • decorate

        public static TimeValidator decorate​(javax.swing.text.JTextComponent tc)
        Decorates the given text component.
        Parameters:
        tc - text component to decorate
        Returns:
        new time 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
      • getTime

        public java.time.LocalTime getTime()
        Returns the time.
        Returns:
        the time