com.gargoylesoftware.htmlunit.javascript.host.html
Class HTMLTextAreaElement

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.Node
              extended by com.gargoylesoftware.htmlunit.javascript.host.EventNode
                  extended by com.gargoylesoftware.htmlunit.javascript.host.Element
                      extended by com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
                          extended by com.gargoylesoftware.htmlunit.javascript.host.FormChild
                              extended by com.gargoylesoftware.htmlunit.javascript.host.FormField
                                  extended by com.gargoylesoftware.htmlunit.javascript.host.html.HTMLTextAreaElement
All Implemented Interfaces:
ScriptableWithFallbackGetter, Serializable, Cloneable, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class HTMLTextAreaElement
extends FormField

The JavaScript object that represents a textarea.

Version:
$Revision: 8391 $
Author:
Mike Bowler, Marc Guillemot, Chris Erskine, Ahmed Ashour, Daniel Gredler, Ronald Brill
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
HTMLElement.ProxyDomNode
 
Field Summary
 
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
BEHAVIOR_ID_CLIENT_CAPS, BEHAVIOR_ID_DOWNLOAD, BEHAVIOR_ID_HOMEPAGE
 
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.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, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
HTMLTextAreaElement()
           
 
Method Summary
 String getAccessKey()
          Returns the "accessKey" property.
 int getCols()
          Returns the number of columns in this text area.
 String getDefaultStyleDisplay()
          INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Returns the default display style.
 String getDefaultValue()
          Returns the textarea's default value, used if the containing form gets reset.
 boolean getReadOnly()
          Gets the value of "readOnly" attribute.
 int getRows()
          Returns the number of rows in this text area.
 int getSelectionEnd()
          Gets the value of "selectionEnd" attribute.
 int getSelectionStart()
          Gets the value of "selectionStart" attribute.
 int getTextLength()
          Gets the value of "textLength" attribute.
 String getType()
          Returns the type of this input.
 String getValue()
          Returns the value of the "value" attribute.
 void select()
          Selects this element.
 void setAccessKey(String accessKey)
          Sets the "accessKey" property.
 void setCols(String cols)
          Sets the number of columns in this text area.
 void setDefaultValue(String defaultValue)
          Sets the textarea's default value, used if the containing form gets reset.
 void setReadOnly(boolean readOnly)
          Sets the value of "readOnly" attribute.
 void setRows(String rows)
          Sets the number of rows in this text area.
 void setSelectionEnd(int end)
          Sets the value of "selectionEnd" attribute.
 void setSelectionRange(int start, int end)
          Sets the selected portion of this input element.
 void setSelectionStart(int start)
          Sets the value of "selectionStart" attribute.
 void setValue(String value)
          Sets the value of the "value" attribute.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.FormField
getDisabled, getName, getOnchange, setDisabled, setDomNode, setName, setOnchange
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.FormChild
getForm
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
addBehavior, addComponentRequest, blur, clearAttributes, clearComponentRequest, click, compareVersions, createEventHandler, createTextRange, dispatchEvent, doComponentRequest, doScroll, fixAttributeName, focus, get, getAlign, getAll, getAttribute, getAttributeNode, getAttributeNodeNS, getAvailHeight, getAvailWidth, getBoundingClientRect, getBoxObject, getBufferDepth, getCh, getChildren, getChOff, getClassList, getClassName_js, getClientHeight, getClientLeft, getClientRects, getClientTop, getClientWidth, getColorDepth, getComponentVersion, getConnectionType, getCookieEnabled, getCpuClass, getDataset, getDir, getDocument, getDomNodeOrDie, getDomNodeOrNull, getElementsByClassName, getFilters, getHeight, getId, getInnerHTML, getInnerText, getJavaEnabled, getLang, getLanguage, getLocalName, getNamespaceURI, getNodeName, getOffsetHeight, getOffsetLeft, getOffsetParent_js, getOffsetTop, getOffsetWidth, getOnsubmit, getOuterHTML, getParentElement, getParentHTMLElement, getPlatform, getPosX, getPosY, getPrefix, getScopeName, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getSpellcheck, getSystemLanguage, getTabIndex, getTagName, getTagUrn, getTitle, getUniqueID, getUserLanguage, getVAlign, getWidth, getWidthOrHeight, getWithFallback, hasAttribute, insertAdjacentElement, insertAdjacentHTML, isAncestorOfEventTarget, isAttributeName, isComponentInstalled, isEndTagForbidden, isHomePage, isLowerCaseInOuterHtml, mergeAttributes, navigateHomePage, parseHtmlSnippet, querySelector, querySelectorAll, readAttributes, removeAttributeNode, removeBehavior, removeExpression, removeNode, scrollIntoView, setActive, setAlign, setAttribute, setAttributeNode, setCh, setChOff, setClassName, setColorAttribute, setDir, setExpression, setHomePage, setId, setInnerHTML, setInnerText, setLang, setLanguage, setOnsubmit, setOuterHTML, setScrollLeft, setScrollTop, setSpellcheck, setTabIndex, setTagUrn, setTextContent, setTitle, setVAlign, setWidthOrHeight, startDownload, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Element
createAttributesObject, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getCurrentStyle, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getPreviousElementSibling, getRuntimeStyle, getStyle, getText, hasAttributeNS, removeAttribute, removeAttributeNS, selectNodes, selectSingleNode, setAttributeNS, setDefaults
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.EventNode
fireEvent, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnerror, getOnfocus, getOnfocusin, getOnfocusout, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnpropertychange, getOnresize, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnerror, setOnfocus, setOnfocusin, setOnfocusout, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnpropertychange, setOnresize
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node
addEventListener, appendChild, attachEvent, cloneNode, compareDocumentPosition, contains, detachEvent, executeEvent, fireEvent, fireEvent, getBaseName, getChildNodes, getEventHandler, getEventHandlerProp, getFirstChild, getJavaScriptNode, getLastChild, getNextSibling, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentNode, getPreviousSibling, getTextContent, getXml, hasChildNodes, hasEventHandlers, insertBefore, insertBeforeImpl, isSameNode, normalize, removeChild, removeEventListener, replaceChild, setEventHandler, setEventHandlerProp, setNodeValue
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, getBrowserVersion, getClassName, getDefaultValue, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElement, setParentScope
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setPrototype, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
delete, delete, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, put, put, setParentScope, setPrototype
 

Constructor Detail

HTMLTextAreaElement

public HTMLTextAreaElement()
Method Detail

getType

public String getType()
Returns the type of this input.

Overrides:
getType in class FormField
Returns:
the type of this input

getValue

public String getValue()
Returns the value of the "value" attribute.

Overrides:
getValue in class FormField
Returns:
the value of the "value" attribute

setValue

public void setValue(String value)
Sets the value of the "value" attribute.

Overrides:
setValue in class FormField
Parameters:
value - the new value

getCols

public int getCols()
Returns the number of columns in this text area.

Returns:
the number of columns in this text area

setCols

public void setCols(String cols)
Sets the number of columns in this text area.

Parameters:
cols - the number of columns in this text area

getRows

public int getRows()
Returns the number of rows in this text area.

Returns:
the number of rows in this text area

setRows

public void setRows(String rows)
Sets the number of rows in this text area.

Parameters:
rows - the number of rows in this text area

getDefaultValue

public String getDefaultValue()
Returns the textarea's default value, used if the containing form gets reset.

Returns:
the textarea's default value, used if the containing form gets reset
See Also:
MSDN Documentation

setDefaultValue

public void setDefaultValue(String defaultValue)
Sets the textarea's default value, used if the containing form gets reset.

Parameters:
defaultValue - the textarea's default value, used if the containing form gets reset
See Also:
MSDN Documentation

getTextLength

public int getTextLength()
Gets the value of "textLength" attribute.

Returns:
the text length

getSelectionStart

public int getSelectionStart()
Gets the value of "selectionStart" attribute.

Returns:
the selection start

setSelectionStart

public void setSelectionStart(int start)
Sets the value of "selectionStart" attribute.

Parameters:
start - selection start

getSelectionEnd

public int getSelectionEnd()
Gets the value of "selectionEnd" attribute.

Returns:
the selection end

setSelectionEnd

public void setSelectionEnd(int end)
Sets the value of "selectionEnd" attribute.

Parameters:
end - selection end

setSelectionRange

public void setSelectionRange(int start,
                              int end)
Sets the selected portion of this input element.

Parameters:
start - the index of the first character to select
end - the index of the character after the selection

select

public void select()
Selects this element.


getReadOnly

public boolean getReadOnly()
Gets the value of "readOnly" attribute.

Returns:
the readOnly attribute

setReadOnly

public void setReadOnly(boolean readOnly)
Sets the value of "readOnly" attribute.

Parameters:
readOnly - the new value

getAccessKey

public String getAccessKey()
Returns the "accessKey" property. Overridden to modify browser configurations.

Overrides:
getAccessKey in class HTMLElement
Returns:
the "accessKey" property

setAccessKey

public void setAccessKey(String accessKey)
Sets the "accessKey" property. Overridden to modify browser configurations.

Overrides:
setAccessKey in class HTMLElement
Parameters:
accessKey - the "accessKey" property

getDefaultStyleDisplay

public String getDefaultStyleDisplay()
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Returns the default display style.

Overrides:
getDefaultStyleDisplay in class Element
Returns:
the default display style.


Copyright © 2002–2013 Gargoyle Software Inc.. All rights reserved.