KickJava   Java API By Example, From Geeks To Geeks.

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


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  * A selectable choice. See the OPTION element definition in HTML 4.0.
17  * <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>.
18  */

19 public interface HTMLOptionElement extends HTMLElement {
20     /**
21      * Returns the <code>FORM</code> element containing this control. Returns
22      * <code>null</code> if this control is not within the context of a form.
23      */

24     public HTMLFormElement getForm();
25
26     /**
27      * Represents the value of the HTML selected attribute. The value of this
28      * attribute does not change if the state of the corresponding form
29      * control, in an interactive user agent, changes. Changing
30      * <code>defaultSelected</code> , however, resets the state of the form
31      * control. See the selected attribute definition in HTML 4.0.
32      */

33     public boolean getDefaultSelected();
34     public void setDefaultSelected(boolean defaultSelected);
35
36     /**
37      * The text contained within the option element.
38      */

39     public String JavaDoc getText();
40
41     /**
42      * The index of this <code>OPTION</code> in its parent <code>SELECT</code>
43      * , starting from 0.
44      */

45     public int getIndex();
46
47     /**
48      * The control is unavailable in this context. See the disabled
49      * attribute definition in HTML 4.0.
50      */

51     public boolean getDisabled();
52     public void setDisabled(boolean disabled);
53
54     /**
55      * Option label for use in hierarchical menus. See the label attribute
56      * definition in HTML 4.0.
57      */

58     public String JavaDoc getLabel();
59     public void setLabel(String JavaDoc label);
60
61     /**
62      * Represents the current state of the corresponding form control, in an
63      * interactive user agent. Changing this attribute changes the state of
64      * the form control, but does not change the value of the HTML selected
65      * attribute of the element.
66      */

67     public boolean getSelected();
68     public void setSelected(boolean selected);
69
70     /**
71      * The current form control value. See the value attribute definition in
72      * HTML 4.0.
73      */

74     public String JavaDoc getValue();
75     public void setValue(String JavaDoc value);
76
77 }
78
79
Popular Tags