KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > w3c > dom > html2 > HTMLInputElement


1 /*
2     GNU LESSER GENERAL PUBLIC LICENSE
3     Copyright (C) 2006 The Lobo Project
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Lesser General Public
7     License as published by the Free Software Foundation; either
8     version 2.1 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13     Lesser General Public License for more details.
14
15     You should have received a copy of the GNU Lesser General Public
16     License along with this library; if not, write to the Free Software
17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18
19     Contact info: xamjadmin@users.sourceforge.net
20 */

21 /*
22  * Copyright (c) 2003 World Wide Web Consortium,
23  * (Massachusetts Institute of Technology, Institut National de
24  * Recherche en Informatique et en Automatique, Keio University). All
25  * Rights Reserved. This program is distributed under the W3C's Software
26  * Intellectual Property License. This program is distributed in the
27  * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
28  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
29  * PURPOSE.
30  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
31  */

32
33 package org.w3c.dom.html2;
34
35 /**
36  * Form control.Depending upon the environment in which the page is being
37  * viewed, the value property may be read-only for the file upload input
38  * type. For the "password" input type, the actual value returned may be
39  * masked to prevent unauthorized use. See the INPUT element definition in [<a HREF='http://www.w3.org/TR/1999/REC-html401-19991224'>HTML 4.01</a>].
40  * <p>See also the <a HREF='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
41  */

42 public interface HTMLInputElement extends HTMLElement {
43     /**
44      * When the <code>type</code> attribute of the element has the value
45      * "text", "file" or "password", this represents the HTML value
46      * attribute of the element. The value of this attribute does not change
47      * if the contents of the corresponding form control, in an interactive
48      * user agent, changes. See the value attribute definition in HTML 4.01.
49      */

50     public String JavaDoc getDefaultValue();
51     /**
52      * When the <code>type</code> attribute of the element has the value
53      * "text", "file" or "password", this represents the HTML value
54      * attribute of the element. The value of this attribute does not change
55      * if the contents of the corresponding form control, in an interactive
56      * user agent, changes. See the value attribute definition in HTML 4.01.
57      */

58     public void setDefaultValue(String JavaDoc defaultValue);
59
60     /**
61      * When <code>type</code> has the value "radio" or "checkbox", this
62      * represents the HTML checked attribute of the element. The value of
63      * this attribute does not change if the state of the corresponding form
64      * control, in an interactive user agent, changes. See the checked
65      * attribute definition in HTML 4.01.
66      */

67     public boolean getDefaultChecked();
68     /**
69      * When <code>type</code> has the value "radio" or "checkbox", this
70      * represents the HTML checked attribute of the element. The value of
71      * this attribute does not change if the state of the corresponding form
72      * control, in an interactive user agent, changes. See the checked
73      * attribute definition in HTML 4.01.
74      */

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
80      * form.
81      */

82     public HTMLFormElement getForm();
83
84     /**
85      * A comma-separated list of content types that a server processing this
86      * form will handle correctly. See the accept attribute definition in
87      * HTML 4.01.
88      */

89     public String JavaDoc getAccept();
90     /**
91      * A comma-separated list of content types that a server processing this
92      * form will handle correctly. See the accept attribute definition in
93      * HTML 4.01.
94      */

95     public void setAccept(String JavaDoc accept);
96
97     /**
98      * A single character access key to give access to the form control. See
99      * the accesskey attribute definition in HTML 4.01.
100      */

101     public String JavaDoc getAccessKey();
102     /**
103      * A single character access key to give access to the form control. See
104      * the accesskey attribute definition in HTML 4.01.
105      */

106     public void setAccessKey(String JavaDoc accessKey);
107
108     /**
109      * Aligns this object (vertically or horizontally) with respect to its
110      * surrounding text. See the align attribute definition in HTML 4.01.
111      * This attribute is deprecated in HTML 4.01.
112      */

113     public String JavaDoc getAlign();
114     /**
115      * Aligns this object (vertically or horizontally) with respect to its
116      * surrounding text. See the align attribute definition in HTML 4.01.
117      * This attribute is deprecated in HTML 4.01.
118      */

119     public void setAlign(String JavaDoc align);
120
121     /**
122      * Alternate text for user agents not rendering the normal content of this
123      * element. See the alt attribute definition in HTML 4.01.
124      */

125     public String JavaDoc getAlt();
126     /**
127      * Alternate text for user agents not rendering the normal content of this
128      * element. See the alt attribute definition in HTML 4.01.
129      */

130     public void setAlt(String JavaDoc alt);
131
132     /**
133      * When the <code>type</code> attribute of the element has the value
134      * "radio" or "checkbox", this represents the current state of the form
135      * control, in an interactive user agent. Changes to this attribute
136      * change the state of the form control, but do not change the value of
137      * the HTML checked attribute of the INPUT element.During the handling
138      * of a click event on an input element with a type attribute that has
139      * the value "radio" or "checkbox", some implementations may change the
140      * value of this property before the event is being dispatched in the
141      * document. If the default action of the event is canceled, the value
142      * of the property may be changed back to its original value. This means
143      * that the value of this property during the handling of click events
144      * is implementation dependent.
145      */

146     public boolean getChecked();
147     /**
148      * When the <code>type</code> attribute of the element has the value
149      * "radio" or "checkbox", this represents the current state of the form
150      * control, in an interactive user agent. Changes to this attribute
151      * change the state of the form control, but do not change the value of
152      * the HTML checked attribute of the INPUT element.During the handling
153      * of a click event on an input element with a type attribute that has
154      * the value "radio" or "checkbox", some implementations may change the
155      * value of this property before the event is being dispatched in the
156      * document. If the default action of the event is canceled, the value
157      * of the property may be changed back to its original value. This means
158      * that the value of this property during the handling of click events
159      * is implementation dependent.
160      */

161     public void setChecked(boolean checked);
162
163     /**
164      * The control is unavailable in this context. See the disabled attribute
165      * definition in HTML 4.01.
166      */

167     public boolean getDisabled();
168     /**
169      * The control is unavailable in this context. See the disabled attribute
170      * definition in HTML 4.01.
171      */

172     public void setDisabled(boolean disabled);
173
174     /**
175      * Maximum number of characters for text fields, when <code>type</code>
176      * has the value "text" or "password". See the maxlength attribute
177      * definition in HTML 4.01.
178      */

179     public int getMaxLength();
180     /**
181      * Maximum number of characters for text fields, when <code>type</code>
182      * has the value "text" or "password". See the maxlength attribute
183      * definition in HTML 4.01.
184      */

185     public void setMaxLength(int maxLength);
186
187     /**
188      * Form control or object name when submitted with a form. See the name
189      * attribute definition in HTML 4.01.
190      */

191     public String JavaDoc getName();
192     /**
193      * Form control or object name when submitted with a form. See the name
194      * attribute definition in HTML 4.01.
195      */

196     public void setName(String JavaDoc name);
197
198     /**
199      * This control is read-only. Relevant only when <code>type</code> has the
200      * value "text" or "password". See the readonly attribute definition in
201      * HTML 4.01.
202      */

203     public boolean getReadOnly();
204     /**
205      * This control is read-only. Relevant only when <code>type</code> has the
206      * value "text" or "password". See the readonly attribute definition in
207      * HTML 4.01.
208      */

209     public void setReadOnly(boolean readOnly);
210
211     /**
212      * Size information. The precise meaning is specific to each type of
213      * field. See the size attribute definition in HTML 4.01.
214      * @version DOM Level 2
215      */

216     public int getSize();
217     /**
218      * Size information. The precise meaning is specific to each type of
219      * field. See the size attribute definition in HTML 4.01.
220      * @version DOM Level 2
221      */

222     public void setSize(int size);
223
224     /**
225      * When the <code>type</code> attribute has the value "image", this
226      * attribute specifies the location of the image to be used to decorate
227      * the graphical submit button. See the src attribute definition in HTML
228      * 4.01.
229      */

230     public String JavaDoc getSrc();
231     /**
232      * When the <code>type</code> attribute has the value "image", this
233      * attribute specifies the location of the image to be used to decorate
234      * the graphical submit button. See the src attribute definition in HTML
235      * 4.01.
236      */

237     public void setSrc(String JavaDoc src);
238
239     /**
240      * Index that represents the element's position in the tabbing order. See
241      * the tabindex attribute definition in HTML 4.01.
242      */

243     public int getTabIndex();
244     /**
245      * Index that represents the element's position in the tabbing order. See
246      * the tabindex attribute definition in HTML 4.01.
247      */

248     public void setTabIndex(int tabIndex);
249
250     /**
251      * The type of control created (all lower case). See the type attribute
252      * definition in HTML 4.01.
253      * @version DOM Level 2
254      */

255     public String JavaDoc getType();
256     /**
257      * The type of control created (all lower case). See the type attribute
258      * definition in HTML 4.01.
259      * @version DOM Level 2
260      */

261     public void setType(String JavaDoc type);
262
263     /**
264      * Use client-side image map. See the usemap attribute definition in HTML
265      * 4.01.
266      */

267     public String JavaDoc getUseMap();
268     /**
269      * Use client-side image map. See the usemap attribute definition in HTML
270      * 4.01.
271      */

272     public void setUseMap(String JavaDoc useMap);
273
274     /**
275      * When the <code>type</code> attribute of the element has the value
276      * "text", "file" or "password", this represents the current contents of
277      * the corresponding form control, in an interactive user agent.
278      * Changing this attribute changes the contents of the form control, but
279      * does not change the value of the HTML value attribute of the element.
280      * When the <code>type</code> attribute of the element has the value
281      * "button", "hidden", "submit", "reset", "image", "checkbox" or
282      * "radio", this represents the HTML value attribute of the element. See
283      * the value attribute definition in HTML 4.01.
284      */

285     public String JavaDoc getValue();
286     /**
287      * When the <code>type</code> attribute of the element has the value
288      * "text", "file" or "password", this represents the current contents of
289      * the corresponding form control, in an interactive user agent.
290      * Changing this attribute changes the contents of the form control, but
291      * does not change the value of the HTML value attribute of the element.
292      * When the <code>type</code> attribute of the element has the value
293      * "button", "hidden", "submit", "reset", "image", "checkbox" or
294      * "radio", this represents the HTML value attribute of the element. See
295      * the value attribute definition in HTML 4.01.
296      */

297     public void setValue(String JavaDoc value);
298
299     /**
300      * Removes keyboard focus from this element.
301      */

302     public void blur();
303
304     /**
305      * Gives keyboard focus to this element.
306      */

307     public void focus();
308
309     /**
310      * Select the contents of the text area. For <code>INPUT</code> elements
311      * whose <code>type</code> attribute has one of the following values:
312      * "text", "file", or "password".
313      */

314     public void select();
315
316     /**
317      * Simulate a mouse-click. For <code>INPUT</code> elements whose
318      * <code>type</code> attribute has one of the following values:
319      * "button", "checkbox", "radio", "reset", or "submit".
320      */

321     public void click();
322
323 }
324
Popular Tags