Package com.teamdev.jxbrowser.dom
Interface SelectElement
- All Superinterfaces:
Element,EventTarget,FormControlElement,Node,SearchContext
An HTML DOM select element.
Provides access to the attributes and to the list of options of the select element.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.teamdev.jxbrowser.dom.Element
Element.AlignTo -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the select element has themultipleattribute and multiple options of the element can be selected at once.voidmultiple(boolean multiple) Sets themultipleattribute of the select element to the givenmultiplevalue.options()Returns an immutable list of the option elements of the select element.Methods inherited from interface com.teamdev.jxbrowser.dom.Element
attributes, blur, boundingClientRect, boundingClientRectInViewport, focus, innerHtml, innerHtml, innerText, innerText, outerHtml, outerHtml, scrollIntoViewMethods inherited from interface com.teamdev.jxbrowser.dom.event.EventTarget
addEventListener, dispatch, eventListeners, removeEventListenerMethods inherited from interface com.teamdev.jxbrowser.dom.FormControlElement
form, isEnabled, value, valueMethods inherited from interface com.teamdev.jxbrowser.dom.Node
appendChild, children, click, close, compareDocumentPosition, document, evaluate, evaluate, insertChild, nextSibling, nodeName, nodeValue, nodeValue, parent, previousSibling, removeChild, replaceChild, textContent, textContent, type, xPathMethods inherited from interface com.teamdev.jxbrowser.dom.SearchContext
findElementByClassName, findElementByCssSelector, findElementById, findElementByName, findElementByTagName, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByName, findElementsByTagName
-
Method Details
-
options
List<OptionElement> options()Returns an immutable list of the option elements of the select element. If the select element does not contain any option elements, returns an empty list.- Throws:
ObjectClosedException- when this instance is closed
-
isMultiple
boolean isMultiple()Returnstrueif the select element has themultipleattribute and multiple options of the element can be selected at once.- Throws:
ObjectClosedException- when this instance is closed
-
multiple
void multiple(boolean multiple) Sets themultipleattribute of the select element to the givenmultiplevalue.- Parameters:
multiple-trueto indicate that multiple options can be selected at once. If it is false, then only one option can be selected at a time.- Throws:
ObjectClosedException- when this instance is closed
-