KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Copyright (c) 2000 World Wide Web Consortium,
3  * (Massachusetts Institute of Technology, Institut National de
4  * Recherche en Informatique et en Automatique, Keio University). All
5  * Rights Reserved. This program is distributed under the W3C's Software
6  * Intellectual Property License. This program is distributed in the
7  * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
10  * details.
11  */

12
13 package org.w3c.dom.html;
14
15 /**
16  * Form control. Note. Depending upon the environment in which the page is
17  * being viewed, the value property may be read-only for the file upload
18  * input type. For the "password" input type, the actual value returned may
19  * be masked to prevent unauthorized use. See the INPUT element definition
20  * in HTML 4.0.
21  * <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>.
22  */

23 public interface HTMLInputElement extends HTMLElement {
24     /**
25      * When the <code>type</code> attribute of the element has the value
26      * "Text", "File" or "Password", this represents the HTML value attribute
27      * of the element. The value of this attribute does not change if the
28      * contents of the corresponding form control, in an interactive user
29      * agent, changes. Changing this attribute, however, resets the contents
30      * of the form control. See the value attribute definition in HTML 4.0.
31      */

32     public String JavaDoc getDefaultValue();
33     public void setDefaultValue(String JavaDoc defaultValue);
34
35     /**
36      * When <code>type</code> has the value "Radio" or "Checkbox", this
37      * represents the HTML checked attribute of the element. The value of
38      * this attribute does not change if the state of the corresponding form
39      * control, in an interactive user agent, changes. Changes to this
40      * attribute, however, resets the state of the form control. See the
41      * checked attribute definition in HTML 4.0.
42      */

43     public boolean getDefaultChecked();
44     public void setDefaultChecked(boolean defaultChecked);
45
46     /**
47      * Returns the <code>FORM</code> element containing this control. Returns
48      * <code>null</code> if this control is not within the context of a form.
49      */

50     public HTMLFormElement getForm();
51
52     /**
53      * A comma-separated list of content types that a server processing this
54      * form will handle correctly. See the accept attribute definition in
55      * HTML 4.0.
56      */

57     public String JavaDoc getAccept();
58     public void setAccept(String JavaDoc accept);
59
60     /**
61      * A single character access key to give access to the form control. See
62      * the accesskey attribute definition in HTML 4.0.
63      */

64     public String JavaDoc getAccessKey();
65     public void setAccessKey(String JavaDoc accessKey);
66
67     /**
68      * Aligns this object (vertically or horizontally) with respect to its
69      * surrounding text. See the align attribute definition in HTML 4.0.
70      * This attribute is deprecated in HTML 4.0.
71      */

72     public String JavaDoc getAlign();
73     public void setAlign(String JavaDoc align);
74
75     /**
76      * Alternate text for user agents not rendering the normal content of
77      * this element. See the alt attribute definition in HTML 4.0.
78      */

79     public String JavaDoc getAlt();
80     public void setAlt(String JavaDoc alt);
81
82     /**
83      * When the <code>type</code> attribute of the element has the value
84      * "Radio" or "Checkbox", this represents the current state of the form
85      * control, in an interactive user agent. Changes to this attribute
86      * change the state of the form control, but do not change the value of
87      * the HTML value attribute of the element.
88      */

89     public boolean getChecked();
90     public void setChecked(boolean checked);
91
92     /**
93      * The control is unavailable in this context. See the disabled
94      * attribute definition in HTML 4.0.
95      */

96     public boolean getDisabled();
97     public void setDisabled(boolean disabled);
98
99     /**
100      * Maximum number of characters for text fields, when <code>type</code>
101      * has the value "Text" or "Password". See the maxlength attribute
102      * definition in HTML 4.0.
103      */

104     public int getMaxLength();
105     public void setMaxLength(int maxLength);
106
107     /**
108      * Form control or object name when submitted with a form. See the name
109      * attribute definition in HTML 4.0.
110      */

111     public String JavaDoc getName();
112     public void setName(String JavaDoc name);
113
114     /**
115      * This control is read-only. Relevant only when <code>type</code> has
116      * the value "Text" or "Password". See the readonly attribute definition
117      * in HTML 4.0.
118      */

119     public boolean getReadOnly();
120     public void setReadOnly(boolean readOnly);
121
122     /**
123      * Size information. The precise meaning is specific to each type of
124      * field. See the size attribute definition in HTML 4.0.
125      */

126     public String JavaDoc getSize();
127     public void setSize(String JavaDoc size);
128
129     /**
130      * When the <code>type</code> attribute has the value "Image", this
131      * attribute specifies the location of the image to be used to decorate
132      * the graphical submit button. See the src attribute definition in HTML
133      * 4.0.
134      */

135     public String JavaDoc getSrc();
136     public void setSrc(String JavaDoc src);
137
138     /**
139      * Index that represents the element's position in the tabbing order. See
140      * the tabindex attribute definition in HTML 4.0.
141      */

142     public int getTabIndex();
143     public void setTabIndex(int tabIndex);
144
145     /**
146      * The type of control created. See the type attribute definition in
147      * HTML 4.0.
148      */

149     public String JavaDoc getType();
150
151     /**
152      * Use client-side image map. See the usemap attribute definition in
153      * HTML 4.0.
154      */

155     public String JavaDoc getUseMap();
156     public void setUseMap(String JavaDoc useMap);
157
158     /**
159      * When the <code>type</code> attribute of the element has the value
160      * "Text", "File" or "Password", this represents the current contents of
161      * the corresponding form control, in an interactive user agent. Changing
162      * this attribute changes the contents of the form control, but does not
163      * change the value of the HTML value attribute of the element. When the
164      * <code>type</code> attribute of the element has the value "Button",
165      * "Hidden", "Submit", "Reset", "Image", "Checkbox" or "Radio", this
166      * represents the HTML value attribute of the element. See the value
167      * attribute definition in HTML 4.0.
168      */

169     public String JavaDoc getValue();
170     public void setValue(String JavaDoc value);
171
172     /**
173      * Removes keyboard focus from this element.
174      */

175     public void blur();
176
177     /**
178      * Gives keyboard focus to this element.
179      */

180     public void focus();
181
182     /**
183      * Select the contents of the text area. For <code>INPUT</code> elements
184      * whose <code>type</code> attribute has one of the following values:
185      * "Text", "File", or "Password".
186      */

187     public void select();
188
189     /**
190      * Simulate a mouse-click. For <code>INPUT</code> elements whose
191      * <code>type</code> attribute has one of the following values: "Button",
192      * "Checkbox", "Radio", "Reset", or "Submit".
193      */

194     public void click();
195
196 }
197
198
Popular Tags