Class HTMLSelectElementImpl

    • Constructor Detail

      • HTMLSelectElementImpl

        public HTMLSelectElementImpl​(java.lang.String name)
    • Method Detail

      • add

        public void add​(HTMLElement element,
                        HTMLElement before)
                 throws org.w3c.dom.DOMException
        Description copied from interface: HTMLSelectElement
        Add a new element to the collection of OPTION elements for this SELECT. This method is the equivalent of the appendChild method of the Node interface if the before parameter is null. It is equivalent to the insertBefore method on the parent of before in all other cases. This method may have no effect if the new element is not an OPTION or an OPTGROUP.
        Specified by:
        add in interface HTMLSelectElement
        Parameters:
        element - The element to add.
        before - The element to insert before, or null for the tail of the list.
        Throws:
        org.w3c.dom.DOMException - NOT_FOUND_ERR: Raised if before is not a descendant of the SELECT element.
      • getMultiple

        public boolean getMultiple()
        Description copied from interface: HTMLSelectElement
        If true, multiple OPTION elements may be selected in this SELECT. See the multiple attribute definition in HTML 4.01.
        Specified by:
        getMultiple in interface HTMLSelectElement
      • getSelectedIndex

        public int getSelectedIndex()
        Description copied from interface: HTMLSelectElement
        The ordinal index of the selected option, starting from 0. The value -1 is returned if no element is selected. If multiple options are selected, the index of the first selected option is returned.
        Specified by:
        getSelectedIndex in interface HTMLSelectElement
      • getSize

        public int getSize()
        Description copied from interface: HTMLSelectElement
        Number of visible rows. See the size attribute definition in HTML 4.01.
        Specified by:
        getSize in interface HTMLSelectElement
      • getType

        public java.lang.String getType()
        Description copied from interface: HTMLSelectElement
        The type of this form control. This is the string "select-multiple" when the multiple attribute is true and the string "select-one" when false.
        Specified by:
        getType in interface HTMLSelectElement
      • remove

        public void remove​(int index)
        Description copied from interface: HTMLSelectElement
        Remove an element from the collection of OPTION elements for this SELECT. Does nothing if no element has the given index.
        Specified by:
        remove in interface HTMLSelectElement
        Parameters:
        index - The index of the item to remove, starting from 0.
      • setLength

        public void setLength​(int length)
                       throws org.w3c.dom.DOMException
        Description copied from interface: HTMLSelectElement
        The number of options in this SELECT.
        Specified by:
        setLength in interface HTMLSelectElement
        Throws:
        org.w3c.dom.DOMException - NOT_SUPPORTED_ERR: if setting the length is not allowed by the implementation.
      • setMultiple

        public void setMultiple​(boolean multiple)
        Description copied from interface: HTMLSelectElement
        If true, multiple OPTION elements may be selected in this SELECT. See the multiple attribute definition in HTML 4.01.
        Specified by:
        setMultiple in interface HTMLSelectElement
      • setSelectedIndex

        public void setSelectedIndex​(int selectedIndex)
        Description copied from interface: HTMLSelectElement
        The ordinal index of the selected option, starting from 0. The value -1 is returned if no element is selected. If multiple options are selected, the index of the first selected option is returned.
        Specified by:
        setSelectedIndex in interface HTMLSelectElement
      • setSize

        public void setSize​(int size)
        Description copied from interface: HTMLSelectElement
        Number of visible rows. See the size attribute definition in HTML 4.01.
        Specified by:
        setSize in interface HTMLSelectElement
      • getFormInputs

        protected FormInput[] getFormInputs()
        Description copied from class: HTMLElementImpl
        Gets form input due to the current element. It should return null except when the element is a form input element.
        Overrides:
        getFormInputs in class HTMLElementImpl
      • resetInput

        public void resetInput()
      • getOnchange

        public org.mozilla.javascript.Function getOnchange()
      • setOnchange

        public void setOnchange​(org.mozilla.javascript.Function value)