KickJava   Java API By Example, From Geeks To Geeks.

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


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  * A selectable choice. See the OPTION element definition in HTML 4.01.
37  * <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>.
38  */

39 public interface HTMLOptionElement extends HTMLElement {
40     /**
41      * Returns the <code>FORM</code> element containing this control. Returns
42      * <code>null</code> if this control is not within the context of a
43      * form.
44      */

45     public HTMLFormElement getForm();
46
47     /**
48      * Represents the value of the HTML selected attribute. The value of this
49      * attribute does not change if the state of the corresponding form
50      * control, in an interactive user agent, changes. See the selected
51      * attribute definition in HTML 4.01.
52      * @version DOM Level 2
53      */

54     public boolean getDefaultSelected();
55     /**
56      * Represents the value of the HTML selected attribute. The value of this
57      * attribute does not change if the state of the corresponding form
58      * control, in an interactive user agent, changes. See the selected
59      * attribute definition in HTML 4.01.
60      * @version DOM Level 2
61      */

62     public void setDefaultSelected(boolean defaultSelected);
63
64     /**
65      * The text contained within the option element.
66      */

67     public String JavaDoc getText();
68
69     /**
70      * The index of this <code>OPTION</code> in its parent <code>SELECT</code>
71      * , starting from 0.
72      * @version DOM Level 2
73      */

74     public int getIndex();
75
76     /**
77      * The control is unavailable in this context. See the disabled attribute
78      * definition in HTML 4.01.
79      */

80     public boolean getDisabled();
81     /**
82      * The control is unavailable in this context. See the disabled attribute
83      * definition in HTML 4.01.
84      */

85     public void setDisabled(boolean disabled);
86
87     /**
88      * Option label for use in hierarchical menus. See the label attribute
89      * definition in HTML 4.01.
90      */

91     public String JavaDoc getLabel();
92     /**
93      * Option label for use in hierarchical menus. See the label attribute
94      * definition in HTML 4.01.
95      */

96     public void setLabel(String JavaDoc label);
97
98     /**
99      * Represents the current state of the corresponding form control, in an
100      * interactive user agent. Changing this attribute changes the state of
101      * the form control, but does not change the value of the HTML selected
102      * attribute of the element.
103      */

104     public boolean getSelected();
105     /**
106      * Represents the current state of the corresponding form control, in an
107      * interactive user agent. Changing this attribute changes the state of
108      * the form control, but does not change the value of the HTML selected
109      * attribute of the element.
110      */

111     public void setSelected(boolean selected);
112
113     /**
114      * The current form control value. See the value attribute definition in
115      * HTML 4.01.
116      */

117     public String JavaDoc getValue();
118     /**
119      * The current form control value. See the value attribute definition in
120      * HTML 4.01.
121      */

122     public void setValue(String JavaDoc value);
123
124 }
125
Popular Tags