001: /*
002: * Copyright (c) 2000 World Wide Web Consortium,
003: * (Massachusetts Institute of Technology, Institut National de
004: * Recherche en Informatique et en Automatique, Keio University). All
005: * Rights Reserved. This program is distributed under the W3C's Software
006: * Intellectual Property License. This program is distributed in the
007: * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
008: * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
009: * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
010: * details.
011: */
012:
013: package org.w3c.dom.html;
014:
015: /**
016: * Form control. Note. Depending upon the environment in which the page is
017: * being viewed, the value property may be read-only for the file upload
018: * input type. For the "password" input type, the actual value returned may
019: * be masked to prevent unauthorized use. See the INPUT element definition
020: * in HTML 4.0.
021: * <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>.
022: */
023: public interface HTMLInputElement extends HTMLElement {
024: /**
025: * When the <code>type</code> attribute of the element has the value
026: * "Text", "File" or "Password", this represents the HTML value attribute
027: * of the element. The value of this attribute does not change if the
028: * contents of the corresponding form control, in an interactive user
029: * agent, changes. Changing this attribute, however, resets the contents
030: * of the form control. See the value attribute definition in HTML 4.0.
031: */
032: public String getDefaultValue();
033:
034: public void setDefaultValue(String defaultValue);
035:
036: /**
037: * When <code>type</code> has the value "Radio" or "Checkbox", this
038: * represents the HTML checked attribute of the element. The value of
039: * this attribute does not change if the state of the corresponding form
040: * control, in an interactive user agent, changes. Changes to this
041: * attribute, however, resets the state of the form control. See the
042: * checked attribute definition in HTML 4.0.
043: */
044: public boolean getDefaultChecked();
045:
046: public void setDefaultChecked(boolean defaultChecked);
047:
048: /**
049: * Returns the <code>FORM</code> element containing this control. Returns
050: * <code>null</code> if this control is not within the context of a form.
051: */
052: public HTMLFormElement getForm();
053:
054: /**
055: * A comma-separated list of content types that a server processing this
056: * form will handle correctly. See the accept attribute definition in
057: * HTML 4.0.
058: */
059: public String getAccept();
060:
061: public void setAccept(String accept);
062:
063: /**
064: * A single character access key to give access to the form control. See
065: * the accesskey attribute definition in HTML 4.0.
066: */
067: public String getAccessKey();
068:
069: public void setAccessKey(String accessKey);
070:
071: /**
072: * Aligns this object (vertically or horizontally) with respect to its
073: * surrounding text. See the align attribute definition in HTML 4.0.
074: * This attribute is deprecated in HTML 4.0.
075: */
076: public String getAlign();
077:
078: public void setAlign(String align);
079:
080: /**
081: * Alternate text for user agents not rendering the normal content of
082: * this element. See the alt attribute definition in HTML 4.0.
083: */
084: public String getAlt();
085:
086: public void setAlt(String alt);
087:
088: /**
089: * When the <code>type</code> attribute of the element has the value
090: * "Radio" or "Checkbox", this represents the current state of the form
091: * control, in an interactive user agent. Changes to this attribute
092: * change the state of the form control, but do not change the value of
093: * the HTML value attribute of the element.
094: */
095: public boolean getChecked();
096:
097: public void setChecked(boolean checked);
098:
099: /**
100: * The control is unavailable in this context. See the disabled
101: * attribute definition in HTML 4.0.
102: */
103: public boolean getDisabled();
104:
105: public void setDisabled(boolean disabled);
106:
107: /**
108: * Maximum number of characters for text fields, when <code>type</code>
109: * has the value "Text" or "Password". See the maxlength attribute
110: * definition in HTML 4.0.
111: */
112: public int getMaxLength();
113:
114: public void setMaxLength(int maxLength);
115:
116: /**
117: * Form control or object name when submitted with a form. See the name
118: * attribute definition in HTML 4.0.
119: */
120: public String getName();
121:
122: public void setName(String name);
123:
124: /**
125: * This control is read-only. Relevant only when <code>type</code> has
126: * the value "Text" or "Password". See the readonly attribute definition
127: * in HTML 4.0.
128: */
129: public boolean getReadOnly();
130:
131: public void setReadOnly(boolean readOnly);
132:
133: /**
134: * Size information. The precise meaning is specific to each type of
135: * field. See the size attribute definition in HTML 4.0.
136: */
137: public String getSize();
138:
139: public void setSize(String size);
140:
141: /**
142: * When the <code>type</code> attribute has the value "Image", this
143: * attribute specifies the location of the image to be used to decorate
144: * the graphical submit button. See the src attribute definition in HTML
145: * 4.0.
146: */
147: public String getSrc();
148:
149: public void setSrc(String src);
150:
151: /**
152: * Index that represents the element's position in the tabbing order. See
153: * the tabindex attribute definition in HTML 4.0.
154: */
155: public int getTabIndex();
156:
157: public void setTabIndex(int tabIndex);
158:
159: /**
160: * The type of control created. See the type attribute definition in
161: * HTML 4.0.
162: */
163: public String getType();
164:
165: /**
166: * Use client-side image map. See the usemap attribute definition in
167: * HTML 4.0.
168: */
169: public String getUseMap();
170:
171: public void setUseMap(String useMap);
172:
173: /**
174: * When the <code>type</code> attribute of the element has the value
175: * "Text", "File" or "Password", this represents the current contents of
176: * the corresponding form control, in an interactive user agent. Changing
177: * this attribute changes the contents of the form control, but does not
178: * change the value of the HTML value attribute of the element. When the
179: * <code>type</code> attribute of the element has the value "Button",
180: * "Hidden", "Submit", "Reset", "Image", "Checkbox" or "Radio", this
181: * represents the HTML value attribute of the element. See the value
182: * attribute definition in HTML 4.0.
183: */
184: public String getValue();
185:
186: public void setValue(String value);
187:
188: /**
189: * Removes keyboard focus from this element.
190: */
191: public void blur();
192:
193: /**
194: * Gives keyboard focus to this element.
195: */
196: public void focus();
197:
198: /**
199: * Select the contents of the text area. For <code>INPUT</code> elements
200: * whose <code>type</code> attribute has one of the following values:
201: * "Text", "File", or "Password".
202: */
203: public void select();
204:
205: /**
206: * Simulate a mouse-click. For <code>INPUT</code> elements whose
207: * <code>type</code> attribute has one of the following values: "Button",
208: * "Checkbox", "Radio", "Reset", or "Submit".
209: */
210: public void click();
211:
212: }
|