Package org.loboevolution.html.dom
Interface HTMLTextAreaElement
- All Superinterfaces:
Element,EventTarget,HTMLElement,InnerHTML,ModelNode,Node,NonDocumentTypeChildNode,ParentNode
- All Known Implementing Classes:
HTMLTextAreaElementImpl
Provides special properties and methods for manipulating the layout and presentation of textarea elements.
-
Field Summary
Fields inherited from interface org.loboevolution.html.node.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NONE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether a form will validate when it is submitted, without having to submit it.intgetCols()Sets or retrieves the width of the object.Sets or retrieves the initial contents of the object.getDirName.getForm()Retrieves a reference to the form that the object is embedded in.getLabels.intSets or retrieves the maximum number of characters that the user can enter in a text control.intgetMinLength.getName()Sets or retrieves the name of the object.Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.intgetRows()Sets or retrieves the number of horizontal rows contained in the object.getSelectionDirection.intGets or sets the end position or offset of a text selection.intGets or sets the starting position or offset of a text selection.intgetTextLength.Returns the error message that would be displayed if the user submits the form, or an empty string if no error message.Returns a ValidityState object that represents the validity states of an element.getValue()Retrieves or sets the text in the entry field of the textArea element.getWrap()Sets or retrieves how to handle wordwrapping in the object.booleangetAutocomplete.booleanProvides a way to direct a user to a specific field when a document loads.booleanisDisabled.booleanSets or retrieves the value indicated whether the content of the object is read-only.booleanWhen present, marks an element that can't be submitted without a value.booleanReturns whether an element will successfully validate based on forms validation rules and constraints.booleanreportValidity.voidselect()Highlights the input area of a form element.voidsetAutocomplete(String autocomplete) setAutocomplete.voidsetAutofocus(boolean autofocus) setAutofocus.voidsetCols.voidsetCustomValidity(String error) Sets a custom error message that is displayed when a form is submitted.voidsetDefaultValue(String defaultValue) setDefaultValue.voidsetDirName(String dirName) setDirName.voidsetDisabled(boolean disabled) setDisabled.voidsetMaxLength(int maxLength) setMaxLength.voidsetMinLength(int minLength) setMinLength.voidsetName.voidsetPlaceholder(String placeholder) setPlaceholder.voidsetRangeText(String replacement) setRangeText.voidsetRangeText(String replacement, int start, int end) setRangeText.voidsetReadOnly(boolean readOnly) setReadOnly.voidsetRequired(boolean required) setRequired.voidsetRows.voidsetSelectionDirection(String selectionDirection) setSelectionDirection.voidsetSelectionEnd(int selectionEnd) setSelectionEnd.voidsetSelectionRange(int start, int end) setSelectionRange.voidsetSelectionRange(int start, int end, Direction direction) Sets the start and end positions of a selection in a text field.voidsetSelectionStart(int selectionStart) setSelectionStart.voidsetValue.voidsetWrap.Methods inherited from interface org.loboevolution.html.node.Element
closest, getAttribute, getAttributeNames, getAttributeNode, getAttributeNodeNS, getAttributeNS, getBoundingClientRect, getClassList, getClassName, getClientHeight, getClientLeft, getClientRects, getClientTop, getClientWidth, getElementsByClassName, getElementsByTagName, getElementsByTagNameNS, getId, getInnerHTML, getLocalName, getNamespaceURI, getOuterHTML, getPrefix, getSchemaTypeInfo, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getSlot, getTagName, hasAttribute, hasAttributeNS, hasPointerCapture, insertAdjacentElement, insertAdjacentHTML, matches, releasePointerCapture, removeAttribute, removeAttributeNode, removeAttributeNS, requestPointerLock, scroll, scrollBy, scrollIntoView, scrollIntoView, scrollTo, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setClassName, setId, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setOuterHTML, setPointerCapture, setScrollLeft, setScrollTop, setSlot, toggleAttribute, toggleAttributeMethods inherited from interface org.loboevolution.events.EventTarget
addEventListener, addEventListener, dispatchEvent, dispatchEvent, removeEventListener, removeEventListenerMethods inherited from interface org.loboevolution.html.dom.HTMLElement
click, getAccessKey, getAccessKeyLabel, getAutocapitalize, getContentEditable, getCurrentStyle, getDir, getInnerText, getLang, getOffsetHeight, getOffsetLeft, getOffsetParent, getOffsetTop, getOffsetWidth, getStyle, getTitle, isDraggable, isHidden, isSpellcheck, isTranslate, setAccessKey, setAutocapitalize, setContentEditable, setDir, setDraggable, setHidden, setInnerText, setLang, setSpellcheck, setTitle, setTranslateMethods inherited from interface org.loboevolution.html.node.InnerHTML
setInnerHTMLMethods inherited from interface org.loboevolution.html.node.ModelNode
getDocumentItem, getFullURL, getParentModelNode, getRenderState, isEqualOrDescendentOf, setDocumentItem, warnMethods inherited from interface org.loboevolution.html.node.Node
appendChild, appendChildrenToCollectionImpl, cloneNode, cloneNode, compareDocumentPosition, contains, extractDescendentsArrayImpl, findUINode, forgetRenderState, getAttributes, getBaseURI, getChildNodes, getDocumentNode, getFeature, getFirstChild, getLastChild, getNextSibling, getNextTo, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, getPreviousTo, getRootNode, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isIsConnected, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, prepend, prependChild, removeChild, replaceChild, setNamespaceURI, setNodeValue, setOwnerDocument, setOwnerDocument, setParentImpl, setPrefix, setTextContent, setUserData, visitMethods inherited from interface org.loboevolution.html.node.NonDocumentTypeChildNode
getNextElementSibling, getPreviousElementSiblingMethods inherited from interface org.loboevolution.html.node.ParentNode
getChildElementCount, getChildren, getFirstElementChild, getLastElementChild, querySelector, querySelectorAll
-
Method Details
-
isAutocomplete
boolean isAutocomplete()getAutocomplete.
- Returns:
- a
Booleanobject.
-
setAutocomplete
setAutocomplete.
- Parameters:
autocomplete- aStringobject.
-
isAutofocus
boolean isAutofocus()Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.- Returns:
- a boolean.
-
setAutofocus
void setAutofocus(boolean autofocus) setAutofocus.
- Parameters:
autofocus- a boolean.
-
getCols
int getCols()Sets or retrieves the width of the object.- Returns:
- a
Integerobject.
-
setCols
setCols.
- Parameters:
cols- aIntegerobject.
-
getDefaultValue
String getDefaultValue()Sets or retrieves the initial contents of the object.- Returns:
- a
Stringobject.
-
setDefaultValue
setDefaultValue.
- Parameters:
defaultValue- aStringobject.
-
getDirName
String getDirName()getDirName.
- Returns:
- a
Stringobject.
-
setDirName
setDirName.
- Parameters:
dirName- aStringobject.
-
isDisabled
boolean isDisabled()isDisabled.
- Returns:
- a boolean.
-
setDisabled
void setDisabled(boolean disabled) setDisabled.
- Parameters:
disabled- a boolean.
-
getForm
HTMLFormElement getForm()Retrieves a reference to the form that the object is embedded in.- Returns:
- a
HTMLFormElementobject.
-
getLabels
NodeList getLabels()getLabels.
- Returns:
- a
NodeListobject.
-
getMaxLength
int getMaxLength()Sets or retrieves the maximum number of characters that the user can enter in a text control.- Returns:
- a
Integerobject.
-
setMaxLength
void setMaxLength(int maxLength) setMaxLength.
- Parameters:
maxLength- aIntegerobject.
-
getMinLength
int getMinLength()getMinLength.
- Returns:
- a
Integerobject.
-
setMinLength
void setMinLength(int minLength) setMinLength.
- Parameters:
minLength- aIntegerobject.
-
getName
String getName()Sets or retrieves the name of the object.- Returns:
- a
Stringobject.
-
setName
setName.
- Parameters:
name- aStringobject.
-
getPlaceholder
String getPlaceholder()Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field.- Returns:
- a
Stringobject.
-
setPlaceholder
setPlaceholder.
- Parameters:
placeholder- aStringobject.
-
isReadOnly
boolean isReadOnly()Sets or retrieves the value indicated whether the content of the object is read-only.- Returns:
- a boolean.
-
setReadOnly
void setReadOnly(boolean readOnly) setReadOnly.
- Parameters:
readOnly- a boolean.
-
isRequired
boolean isRequired()When present, marks an element that can't be submitted without a value.- Returns:
- a boolean.
-
setRequired
void setRequired(boolean required) setRequired.
- Parameters:
required- a boolean.
-
getRows
int getRows()Sets or retrieves the number of horizontal rows contained in the object.- Returns:
- a
Integerobject.
-
setRows
setRows.
- Parameters:
rows- aIntegerobject.
-
getSelectionDirection
String getSelectionDirection()getSelectionDirection.
- Returns:
- a
Stringobject.
-
setSelectionDirection
setSelectionDirection.
- Parameters:
selectionDirection- aStringobject.
-
getSelectionEnd
int getSelectionEnd()Gets or sets the end position or offset of a text selection.- Returns:
- a
Integerobject.
-
setSelectionEnd
void setSelectionEnd(int selectionEnd) setSelectionEnd.
- Parameters:
selectionEnd- aIntegerobject.
-
getSelectionStart
int getSelectionStart()Gets or sets the starting position or offset of a text selection.- Returns:
- a
Integerobject.
-
setSelectionStart
void setSelectionStart(int selectionStart) setSelectionStart.
- Parameters:
selectionStart- aIntegerobject.
-
getTextLength
int getTextLength()getTextLength.
- Returns:
- a
Integerobject.
-
getValidationMessage
String getValidationMessage()Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.- Returns:
- a
Stringobject.
-
getValidity
ValidityState getValidity()Returns a ValidityState object that represents the validity states of an element.- Returns:
- a
ValidityStateobject.
-
getValue
String getValue()Retrieves or sets the text in the entry field of the textArea element.- Returns:
- a
Stringobject.
-
setValue
setValue.
- Parameters:
value- aStringobject.
-
isWillValidate
boolean isWillValidate()Returns whether an element will successfully validate based on forms validation rules and constraints.- Returns:
- a boolean.
-
getWrap
String getWrap()Sets or retrieves how to handle wordwrapping in the object.- Returns:
- a
Stringobject.
-
setWrap
setWrap.
- Parameters:
wrap- aStringobject.
-
checkValidity
boolean checkValidity()Returns whether a form will validate when it is submitted, without having to submit it.- Returns:
- a boolean.
-
reportValidity
boolean reportValidity()reportValidity.
- Returns:
- a boolean.
-
select
void select()Highlights the input area of a form element. -
setCustomValidity
Sets a custom error message that is displayed when a form is submitted.- Parameters:
error- Sets a custom error message that is displayed when a form is submitted.
-
setRangeText
setRangeText.
- Parameters:
replacement- aStringobject.
-
setRangeText
setRangeText.
-
setSelectionRange
Sets the start and end positions of a selection in a text field.- Parameters:
start- The offset into the text field for the start of the selection.end- The offset into the text field for the end of the selection.direction- The direction in which the selection is performed.
-
setSelectionRange
void setSelectionRange(int start, int end) setSelectionRange.
-