Class HtmlDateInput

    • Method Detail

      • doType

        protected void doType​(char c,
                              boolean lastType)
        Performs the effective type action, called after the keyPress event and before the keyUp event.
        Overrides:
        doType in class HtmlElement
        Parameters:
        c - the character you with to simulate typing
        lastType - is this the last character to type
      • doType

        protected void doType​(int keyCode,
                              boolean lastType)
        Performs the effective type action, called after the keyPress event and before the keyUp event. An example of predefined values is KeyboardEvent.DOM_VK_PAGE_DOWN.
        Overrides:
        doType in class HtmlElement
        Parameters:
        keyCode - the key code wish to simulate typing
        lastType - is this the last to type
      • typeDone

        protected void typeDone​(java.lang.String newValue,
                                boolean notifyAttributeChangeListeners)
        Called from DoTypeProcessor.
        Overrides:
        typeDone in class HtmlElement
        Parameters:
        newValue - the new value
        notifyAttributeChangeListeners - to notify the associated HtmlAttributeChangeListeners
      • isSubmittableByEnter

        protected boolean isSubmittableByEnter()
        Returns true if clicking Enter (ASCII 10, or '\n') should submit the enclosed form (if any). The default implementation returns false.
        Overrides:
        isSubmittableByEnter in class HtmlElement
        Returns:
        true if clicking Enter should submit the enclosed form (if any)
      • select

        public void select()
        Focuses this element and selects all of its text.
        Specified by:
        select in interface com.gargoylesoftware.htmlunit.html.impl.SelectableTextInput
      • getSelectedText

        public java.lang.String getSelectedText()
        Returns the selected text in this element, or null if there is no selected text in this element.
        Specified by:
        getSelectedText in interface com.gargoylesoftware.htmlunit.html.impl.SelectableTextInput
        Returns:
        the selected text in this element, or null if there is no selected text in this element
      • getText

        public java.lang.String getText()
        Returns all of the text in this element.
        Specified by:
        getText in interface com.gargoylesoftware.htmlunit.html.impl.SelectableTextInput
        Returns:
        all of the text in this element
      • setText

        public void setText​(java.lang.String text)
        Sets the text in this element.
        Specified by:
        setText in interface com.gargoylesoftware.htmlunit.html.impl.SelectableTextInput
        Parameters:
        text - the text to put in this element
      • getSelectionStart

        public int getSelectionStart()
        Returns the start position of the selected text in this element.
        Specified by:
        getSelectionStart in interface com.gargoylesoftware.htmlunit.html.impl.SelectableTextInput
        Returns:
        the start position of the selected text in this element
      • setSelectionStart

        public void setSelectionStart​(int selectionStart)
        Sets the start position of the selected text in this element.
        Specified by:
        setSelectionStart in interface com.gargoylesoftware.htmlunit.html.impl.SelectableTextInput
        Parameters:
        selectionStart - the start position of the selected text in this element
      • getSelectionEnd

        public int getSelectionEnd()
        Returns the end position of the selected text in this element.
        Specified by:
        getSelectionEnd in interface com.gargoylesoftware.htmlunit.html.impl.SelectableTextInput
        Returns:
        the end position of the selected text in this element
      • setSelectionEnd

        public void setSelectionEnd​(int selectionEnd)
        Sets the end position of the selected text in this element.
        Specified by:
        setSelectionEnd in interface com.gargoylesoftware.htmlunit.html.impl.SelectableTextInput
        Parameters:
        selectionEnd - the end position of the selected text in this element
      • setAttributeNS

        protected void setAttributeNS​(java.lang.String namespaceURI,
                                      java.lang.String qualifiedName,
                                      java.lang.String attributeValue,
                                      boolean notifyAttributeChangeListeners,
                                      boolean notifyMutationObservers)
        Sets the value of the attribute specified by namespace and qualified name.
        Overrides:
        setAttributeNS in class HtmlInput
        Parameters:
        namespaceURI - the URI that identifies an XML namespace
        qualifiedName - the qualified name (prefix:local) of the attribute
        attributeValue - the value of the attribute
        notifyAttributeChangeListeners - to notify the associated HtmlAttributeChangeListeners
        notifyMutationObservers - to notify MutationObservers or not
      • setValueAttribute

        public void setValueAttribute​(java.lang.String newValue)
        Sets the content of the value attribute.
        Overrides:
        setValueAttribute in class HtmlInput
        Parameters:
        newValue - the new value
      • reset

        public void reset()
        Returns the value of this element to the default value or checked state (usually what it was at the time the page was loaded, unless it has been modified via JavaScript).
        Specified by:
        reset in interface SubmittableElement
        Overrides:
        reset in class HtmlInput
        See Also:
        HtmlInput.reset()
      • isPatternSupported

        protected boolean isPatternSupported()
        Returns if the input element supports pattern validation. Refer to the HTML 5 documentation for details.
        Overrides:
        isPatternSupported in class HtmlInput
        Returns:
        if the input element supports pattern validation
      • cloneNode

        public DomNode cloneNode​(boolean deep)
        Specified by:
        cloneNode in interface org.w3c.dom.Node
        Overrides:
        cloneNode in class HtmlInput
      • isValid

        public boolean isValid()
        Returns whether this element satisfies all form validation constraints set.
        Overrides:
        isValid in class HtmlInput
        Returns:
        whether this element satisfies all form validation constraints set