OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / lib / classpath / external / w3c_dom / org / w3c / dom / html2 / HTMLOptionElement.java
1 /*
2  * Copyright (c) 2003 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.
10  * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
11  */
12
13 package org.w3c.dom.html2;
14
15 /**
16  * A selectable choice. See the OPTION element definition in HTML 4.01.
17  * <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>.
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 
23      * form. 
24      */
25     public HTMLFormElement getForm();
26
27     /**
28      * Represents the value of the HTML selected attribute. The value of this 
29      * attribute does not change if the state of the corresponding form 
30      * control, in an interactive user agent, changes. See the selected 
31      * attribute definition in HTML 4.01.
32      * @version DOM Level 2
33      */
34     public boolean getDefaultSelected();
35     /**
36      * Represents the value of the HTML selected attribute. The value of this 
37      * attribute does not change if the state of the corresponding form 
38      * control, in an interactive user agent, changes. See the selected 
39      * attribute definition in HTML 4.01.
40      * @version DOM Level 2
41      */
42     public void setDefaultSelected(boolean defaultSelected);
43
44     /**
45      * The text contained within the option element. 
46      */
47     public String getText();
48
49     /**
50      * The index of this <code>OPTION</code> in its parent <code>SELECT</code>
51      * , starting from 0.
52      * @version DOM Level 2
53      */
54     public int getIndex();
55
56     /**
57      * The control is unavailable in this context. See the disabled attribute 
58      * definition in HTML 4.01.
59      */
60     public boolean getDisabled();
61     /**
62      * The control is unavailable in this context. See the disabled attribute 
63      * definition in HTML 4.01.
64      */
65     public void setDisabled(boolean disabled);
66
67     /**
68      * Option label for use in hierarchical menus. See the label attribute 
69      * definition in HTML 4.01.
70      */
71     public String getLabel();
72     /**
73      * Option label for use in hierarchical menus. See the label attribute 
74      * definition in HTML 4.01.
75      */
76     public void setLabel(String label);
77
78     /**
79      * Represents the current state of the corresponding form control, in an 
80      * interactive user agent. Changing this attribute changes the state of 
81      * the form control, but does not change the value of the HTML selected 
82      * attribute of the element.
83      */
84     public boolean getSelected();
85     /**
86      * Represents the current state of the corresponding form control, in an 
87      * interactive user agent. Changing this attribute changes the state of 
88      * the form control, but does not change the value of the HTML selected 
89      * attribute of the element.
90      */
91     public void setSelected(boolean selected);
92
93     /**
94      * The current form control value. See the value attribute definition in 
95      * HTML 4.01.
96      */
97     public String getValue();
98     /**
99      * The current form control value. See the value attribute definition in 
100      * HTML 4.01.
101      */
102     public void setValue(String value);
103
104 }