author | zgu |
Mon, 14 Jan 2019 12:51:45 -0500 | |
changeset 53276 | 72fdf46a274e |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
12005 | 1 |
/* |
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
3 |
* |
|
4 |
* This code is free software; you can redistribute it and/or modify it |
|
5 |
* under the terms of the GNU General Public License version 2 only, as |
|
6 |
* published by the Free Software Foundation. Oracle designates this |
|
7 |
* particular file as subject to the "Classpath" exception as provided |
|
8 |
* by Oracle in the LICENSE file that accompanied this code. |
|
9 |
* |
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
14 |
* accompanied this code). |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License version |
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
19 |
* |
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
21 |
* or visit www.oracle.com if you need additional information or have any |
|
22 |
* questions. |
|
23 |
*/ |
|
24 |
||
25 |
/* |
|
26 |
* This file is available under and governed by the GNU General Public |
|
27 |
* License version 2 only, as published by the Free Software Foundation. |
|
28 |
* However, the following notice accompanied the original version of this |
|
29 |
* file and, per its terms, should not be removed: |
|
30 |
* |
|
31 |
* Copyright (c) 2000 World Wide Web Consortium, |
|
32 |
* (Massachusetts Institute of Technology, Institut National de |
|
33 |
* Recherche en Informatique et en Automatique, Keio University). All |
|
34 |
* Rights Reserved. This program is distributed under the W3C's Software |
|
35 |
* Intellectual Property License. This program is distributed in the |
|
36 |
* hope that it will be useful, but WITHOUT ANY WARRANTY; without even |
|
37 |
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
38 |
* PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more |
|
39 |
* details. |
|
40 |
*/ |
|
41 |
||
42 |
package org.w3c.dom.html; |
|
43 |
||
44 |
/** |
|
45 |
* Form control. Note. Depending upon the environment in which the page is |
|
46 |
* being viewed, the value property may be read-only for the file upload |
|
47 |
* input type. For the "password" input type, the actual value returned may |
|
48 |
* be masked to prevent unauthorized use. See the INPUT element definition |
|
49 |
* in HTML 4.0. |
|
50 |
* <p>See also the <a href='http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510'>Document Object Model (DOM) Level 2 Specification</a>. |
|
38500
78aedc2ee005
8054632: [since-tag]: javadoc for xml classes has invalid @since tag
joehw
parents:
29948
diff
changeset
|
51 |
* |
78aedc2ee005
8054632: [since-tag]: javadoc for xml classes has invalid @since tag
joehw
parents:
29948
diff
changeset
|
52 |
* @since 1.4, DOM Level 2 |
12005 | 53 |
*/ |
54 |
public interface HTMLInputElement extends HTMLElement { |
|
55 |
/** |
|
56 |
* When the <code>type</code> attribute of the element has the value |
|
57 |
* "Text", "File" or "Password", this represents the HTML value attribute |
|
58 |
* of the element. The value of this attribute does not change if the |
|
59 |
* contents of the corresponding form control, in an interactive user |
|
60 |
* agent, changes. Changing this attribute, however, resets the contents |
|
61 |
* of the form control. See the value attribute definition in HTML 4.0. |
|
62 |
*/ |
|
63 |
public String getDefaultValue(); |
|
64 |
public void setDefaultValue(String defaultValue); |
|
65 |
||
66 |
/** |
|
67 |
* When <code>type</code> has the value "Radio" or "Checkbox", this |
|
68 |
* represents the HTML checked attribute of the element. The value of |
|
69 |
* this attribute does not change if the state of the corresponding form |
|
70 |
* control, in an interactive user agent, changes. Changes to this |
|
71 |
* attribute, however, resets the state of the form control. See the |
|
72 |
* checked attribute definition in HTML 4.0. |
|
73 |
*/ |
|
74 |
public boolean getDefaultChecked(); |
|
75 |
public void setDefaultChecked(boolean defaultChecked); |
|
76 |
||
77 |
/** |
|
78 |
* Returns the <code>FORM</code> element containing this control. Returns |
|
79 |
* <code>null</code> if this control is not within the context of a form. |
|
80 |
*/ |
|
81 |
public HTMLFormElement getForm(); |
|
82 |
||
83 |
/** |
|
84 |
* A comma-separated list of content types that a server processing this |
|
85 |
* form will handle correctly. See the accept attribute definition in |
|
86 |
* HTML 4.0. |
|
87 |
*/ |
|
88 |
public String getAccept(); |
|
89 |
public void setAccept(String accept); |
|
90 |
||
91 |
/** |
|
92 |
* A single character access key to give access to the form control. See |
|
93 |
* the accesskey attribute definition in HTML 4.0. |
|
94 |
*/ |
|
95 |
public String getAccessKey(); |
|
96 |
public void setAccessKey(String accessKey); |
|
97 |
||
98 |
/** |
|
99 |
* Aligns this object (vertically or horizontally) with respect to its |
|
100 |
* surrounding text. See the align attribute definition in HTML 4.0. |
|
101 |
* This attribute is deprecated in HTML 4.0. |
|
102 |
*/ |
|
103 |
public String getAlign(); |
|
104 |
public void setAlign(String align); |
|
105 |
||
106 |
/** |
|
107 |
* Alternate text for user agents not rendering the normal content of |
|
108 |
* this element. See the alt attribute definition in HTML 4.0. |
|
109 |
*/ |
|
110 |
public String getAlt(); |
|
111 |
public void setAlt(String alt); |
|
112 |
||
113 |
/** |
|
114 |
* When the <code>type</code> attribute of the element has the value |
|
115 |
* "Radio" or "Checkbox", this represents the current state of the form |
|
116 |
* control, in an interactive user agent. Changes to this attribute |
|
117 |
* change the state of the form control, but do not change the value of |
|
118 |
* the HTML value attribute of the element. |
|
119 |
*/ |
|
120 |
public boolean getChecked(); |
|
121 |
public void setChecked(boolean checked); |
|
122 |
||
123 |
/** |
|
124 |
* The control is unavailable in this context. See the disabled |
|
125 |
* attribute definition in HTML 4.0. |
|
126 |
*/ |
|
127 |
public boolean getDisabled(); |
|
128 |
public void setDisabled(boolean disabled); |
|
129 |
||
130 |
/** |
|
131 |
* Maximum number of characters for text fields, when <code>type</code> |
|
132 |
* has the value "Text" or "Password". See the maxlength attribute |
|
133 |
* definition in HTML 4.0. |
|
134 |
*/ |
|
135 |
public int getMaxLength(); |
|
136 |
public void setMaxLength(int maxLength); |
|
137 |
||
138 |
/** |
|
139 |
* Form control or object name when submitted with a form. See the name |
|
140 |
* attribute definition in HTML 4.0. |
|
141 |
*/ |
|
142 |
public String getName(); |
|
143 |
public void setName(String name); |
|
144 |
||
145 |
/** |
|
146 |
* This control is read-only. Relevant only when <code>type</code> has |
|
147 |
* the value "Text" or "Password". See the readonly attribute definition |
|
148 |
* in HTML 4.0. |
|
149 |
*/ |
|
150 |
public boolean getReadOnly(); |
|
151 |
public void setReadOnly(boolean readOnly); |
|
152 |
||
153 |
/** |
|
154 |
* Size information. The precise meaning is specific to each type of |
|
155 |
* field. See the size attribute definition in HTML 4.0. |
|
156 |
*/ |
|
157 |
public String getSize(); |
|
158 |
public void setSize(String size); |
|
159 |
||
160 |
/** |
|
161 |
* When the <code>type</code> attribute has the value "Image", this |
|
162 |
* attribute specifies the location of the image to be used to decorate |
|
163 |
* the graphical submit button. See the src attribute definition in HTML |
|
164 |
* 4.0. |
|
165 |
*/ |
|
166 |
public String getSrc(); |
|
167 |
public void setSrc(String src); |
|
168 |
||
169 |
/** |
|
170 |
* Index that represents the element's position in the tabbing order. See |
|
171 |
* the tabindex attribute definition in HTML 4.0. |
|
172 |
*/ |
|
173 |
public int getTabIndex(); |
|
174 |
public void setTabIndex(int tabIndex); |
|
175 |
||
176 |
/** |
|
177 |
* The type of control created. See the type attribute definition in |
|
178 |
* HTML 4.0. |
|
179 |
*/ |
|
180 |
public String getType(); |
|
181 |
||
182 |
/** |
|
183 |
* Use client-side image map. See the usemap attribute definition in |
|
184 |
* HTML 4.0. |
|
185 |
*/ |
|
186 |
public String getUseMap(); |
|
187 |
public void setUseMap(String useMap); |
|
188 |
||
189 |
/** |
|
190 |
* When the <code>type</code> attribute of the element has the value |
|
191 |
* "Text", "File" or "Password", this represents the current contents of |
|
192 |
* the corresponding form control, in an interactive user agent. Changing |
|
193 |
* this attribute changes the contents of the form control, but does not |
|
194 |
* change the value of the HTML value attribute of the element. When the |
|
195 |
* <code>type</code> attribute of the element has the value "Button", |
|
196 |
* "Hidden", "Submit", "Reset", "Image", "Checkbox" or "Radio", this |
|
197 |
* represents the HTML value attribute of the element. See the value |
|
198 |
* attribute definition in HTML 4.0. |
|
199 |
*/ |
|
200 |
public String getValue(); |
|
201 |
public void setValue(String value); |
|
202 |
||
203 |
/** |
|
204 |
* Removes keyboard focus from this element. |
|
205 |
*/ |
|
206 |
public void blur(); |
|
207 |
||
208 |
/** |
|
209 |
* Gives keyboard focus to this element. |
|
210 |
*/ |
|
211 |
public void focus(); |
|
212 |
||
213 |
/** |
|
214 |
* Select the contents of the text area. For <code>INPUT</code> elements |
|
215 |
* whose <code>type</code> attribute has one of the following values: |
|
216 |
* "Text", "File", or "Password". |
|
217 |
*/ |
|
218 |
public void select(); |
|
219 |
||
220 |
/** |
|
221 |
* Simulate a mouse-click. For <code>INPUT</code> elements whose |
|
222 |
* <code>type</code> attribute has one of the following values: "Button", |
|
223 |
* "Checkbox", "Radio", "Reset", or "Submit". |
|
224 |
*/ |
|
225 |
public void click(); |
|
226 |
||
227 |
} |