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 TypeMethodDescriptionboolean
Returnstrue
if the select element has themultiple
attribute and multiple options of the element can be selected at once.void
multiple
(boolean multiple) Sets themultiple
attribute of the select element to the givenmultiple
value.options()
Returns an immutable list of the option elements of the select element.Methods inherited from interface com.teamdev.jxbrowser.dom.Element
attributeNodes, attributes, attributeValue, blur, boundingClientRect, focus, hasAttribute, innerHtml, innerHtml, innerText, innerText, outerHtml, outerHtml, putAttribute, removeAttribute, scrollIntoView
Methods inherited from interface com.teamdev.jxbrowser.dom.event.EventTarget
addEventListener, dispatch, eventListeners, removeEventListener
Methods inherited from interface com.teamdev.jxbrowser.dom.FormControlElement
form, isEnabled, value, value
Methods 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, xPath
Methods 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()Returnstrue
if the select element has themultiple
attribute and multiple options of the element can be selected at once.- Throws:
ObjectClosedException
- when this instance is closed
-
multiple
void multiple(boolean multiple) Sets themultiple
attribute of the select element to the givenmultiple
value.- Parameters:
multiple
-true
to 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
-