| /* |
| * Copyright 2012 Google Inc. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| * use this file except in compliance with the License. You may obtain a copy of |
| * the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| * License for the specific language governing permissions and limitations under |
| * the License. |
| */ |
| package elemental.html; |
| import elemental.dom.Element; |
| import elemental.dom.NodeList; |
| |
| import elemental.events.*; |
| import elemental.util.*; |
| import elemental.dom.*; |
| import elemental.html.*; |
| import elemental.css.*; |
| import elemental.stylesheets.*; |
| |
| import java.util.Date; |
| |
| /** |
| * DOM <code>TextArea</code> objects expose the <a title="http://dev.w3.org/html5/spec/the-button-element.html#the-textarea-element" class=" external" rel="external" href="http://dev.w3.org/html5/spec/the-button-element.html#the-textarea-element" target="_blank">HTMLTextAreaElement</a> (or |
| <span><a rel="custom" href="https://developer.mozilla.org/en/HTML">HTML 4</a></span> <code><a title="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-24874179" class="external" rel="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-24874179" target="_blank">HTMLTextAreaElement</a></code>) interface, which provides special properties and methods (beyond the regular <a title="en/DOM/element" rel="internal" href="https://developer.mozilla.org/en/DOM/element">element</a> object interface they also have available to them by inheritance) for manipulating the layout and presentation of <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea"><textarea></a></code> |
| elements. |
| */ |
| public interface TextAreaElement extends Element { |
| |
| |
| /** |
| * Reflects the |
| |
| <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-autofocus">autofocus</a></code> |
| HTML attribute, indicating that the control should have input focus when the page loads |
| */ |
| boolean isAutofocus(); |
| |
| void setAutofocus(boolean arg); |
| |
| |
| /** |
| * Reflects the |
| |
| <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-cols">cols</a></code> |
| HTML attribute, indicating the visible width of the text area. |
| */ |
| int getCols(); |
| |
| void setCols(int arg); |
| |
| |
| /** |
| * The control's default value, which behaves like the <strong><a title="en/DOM/element.textContent" rel="internal" href="https://developer.mozilla.org/En/DOM/Node.textContent">textContent</a></strong> property. |
| */ |
| String getDefaultValue(); |
| |
| void setDefaultValue(String arg); |
| |
| String getDirName(); |
| |
| void setDirName(String arg); |
| |
| |
| /** |
| * Reflects the |
| |
| <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-disabled">disabled</a></code> |
| HTML attribute, indicating that the control is not available for interaction. |
| */ |
| boolean isDisabled(); |
| |
| void setDisabled(boolean arg); |
| |
| |
| /** |
| * <p>The containing form element, if this element is in a form. If this element is not contained in a form element:</p> <ul> <li> |
| <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span> this can be the |
| |
| <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form#attr-id">id</a></code> |
| attribute of any <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form"><form></a></code> |
| element in the same document.</li> <li> |
| <span><a rel="custom" href="https://developer.mozilla.org/en/HTML">HTML 4</a></span> this must be <code>null</code>.</li> </ul> |
| */ |
| FormElement getForm(); |
| |
| |
| /** |
| * A list of <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/label"><label></a></code> |
| elements that are labels for this element. |
| */ |
| NodeList getLabels(); |
| |
| |
| /** |
| * Reflects the |
| |
| <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-maxlength">maxlength</a></code> |
| HTML attribute, indicating the maximum number of characters the user can enter. This constraint is evaluated only when the value changes. |
| */ |
| int getMaxLength(); |
| |
| void setMaxLength(int arg); |
| |
| |
| /** |
| * Reflects |
| |
| <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-name">name</a></code> |
| HTML attribute, containing the name of the control. |
| */ |
| String getName(); |
| |
| void setName(String arg); |
| |
| |
| /** |
| * Reflects the |
| |
| <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-placeholder">placeholder</a></code> |
| HTML attribute, containing a hint to the user about what to enter in the control. |
| */ |
| String getPlaceholder(); |
| |
| void setPlaceholder(String arg); |
| |
| |
| /** |
| * Reflects the |
| |
| <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-readonly">readonly</a></code> |
| HTML attribute, indicating that the user cannot modify the value of the control. |
| */ |
| boolean isReadOnly(); |
| |
| void setReadOnly(boolean arg); |
| |
| |
| /** |
| * Reflects the |
| |
| <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-required">required</a></code> |
| HTML attribute, indicating that the user must specify a value before submitting the form. |
| */ |
| boolean isRequired(); |
| |
| void setRequired(boolean arg); |
| |
| |
| /** |
| * Reflects the |
| |
| <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-rows">rows</a></code> |
| HTML attribute, indicating the number of visible text lines for the control. |
| */ |
| int getRows(); |
| |
| void setRows(int arg); |
| |
| |
| /** |
| * The direction in which selection occurred. This is "forward" if selection was performed in the start-to-end direction of the current locale, or "backward" for the opposite direction. This can also be "none" if the direction is unknown." |
| */ |
| String getSelectionDirection(); |
| |
| void setSelectionDirection(String arg); |
| |
| |
| /** |
| * The index of the end of selected text. |
| <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span> If no text is selected, contains the index of the character that follows the input cursor. On being set, the control behaves as if <strong>setSelectionRange</strong>() had been called with this as the second argument, and <strong>selectionStart</strong> as the first argument. |
| */ |
| int getSelectionEnd(); |
| |
| void setSelectionEnd(int arg); |
| |
| |
| /** |
| * The index of the beginning of selected text. |
| <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span> If no text is selected, contains the index of the character that follows the input cursor. On being set, the control behaves as if <strong>setSelectionRange</strong>() had been called with this as the first argument, and <strong>selectionEnd</strong> as the second argument. |
| */ |
| int getSelectionStart(); |
| |
| void setSelectionStart(int arg); |
| |
| |
| /** |
| * The codepoint length of the control's value. |
| */ |
| int getTextLength(); |
| |
| |
| /** |
| * The string <code>textarea</code>. |
| */ |
| String getType(); |
| |
| |
| /** |
| * A localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate for constraint validation (<strong>willValidate</strong> is false), or it satisfies its constraints. |
| */ |
| String getValidationMessage(); |
| |
| |
| /** |
| * The validity states that this element is in. |
| */ |
| ValidityState getValidity(); |
| |
| |
| /** |
| * The raw value contained in the control. |
| */ |
| String getValue(); |
| |
| void setValue(String arg); |
| |
| |
| /** |
| * Indicates whether the element is a candidate for constraint validation. It is false if any conditions bar it from constraint validation. |
| */ |
| boolean isWillValidate(); |
| |
| |
| /** |
| * Reflects the |
| |
| <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-wrap">wrap</a></code> |
| HTML attribute, indicating how the control wraps text. |
| */ |
| String getWrap(); |
| |
| void setWrap(String arg); |
| |
| |
| /** |
| * Returns false if the button is a candidate for constraint validation, and it does not satisfy its constraints. In this case, it also fires an <code>invalid</code> event at the control. It returns true if the control is not a candidate for constraint validation, or if it satisfies its constraints. |
| */ |
| boolean checkValidity(); |
| |
| |
| /** |
| * Selects the contents of the control. |
| */ |
| void select(); |
| |
| |
| /** |
| * Sets a custom validity message for the element. If this message is not the empty string, then the element is suffering from a custom validity error, and does not validate. |
| */ |
| void setCustomValidity(String error); |
| |
| |
| /** |
| * Selects a range of text, and sets <code>selectionStart</code> and <code>selectionEnd</code>. If either argument is greater than the length of the value, it is treated as pointing to the end of the value. If <code>end</code> is less than <code>start</code>, then both are treated as the value of <code>end</code>. |
| */ |
| void setSelectionRange(int start, int end); |
| |
| |
| /** |
| * Selects a range of text, and sets <code>selectionStart</code> and <code>selectionEnd</code>. If either argument is greater than the length of the value, it is treated as pointing to the end of the value. If <code>end</code> is less than <code>start</code>, then both are treated as the value of <code>end</code>. |
| */ |
| void setSelectionRange(int start, int end, String direction); |
| } |