01: /*
02: * Copyright (c) 2000 World Wide Web Consortium,
03: * (Massachusetts Institute of Technology, Institut National de
04: * Recherche en Informatique et en Automatique, Keio University). All
05: * Rights Reserved. This program is distributed under the W3C's Software
06: * Intellectual Property License. This program is distributed in the
07: * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
08: * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
09: * 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:
35: public void setDefaultSelected(boolean defaultSelected);
36:
37: /**
38: * The text contained within the option element.
39: */
40: public String getText();
41:
42: /**
43: * The index of this <code>OPTION</code> in its parent <code>SELECT</code>
44: * , starting from 0.
45: */
46: public int getIndex();
47:
48: /**
49: * The control is unavailable in this context. See the disabled
50: * attribute definition in HTML 4.0.
51: */
52: public boolean getDisabled();
53:
54: public void setDisabled(boolean disabled);
55:
56: /**
57: * Option label for use in hierarchical menus. See the label attribute
58: * definition in HTML 4.0.
59: */
60: public String getLabel();
61:
62: public void setLabel(String label);
63:
64: /**
65: * Represents the current state of the corresponding form control, in an
66: * interactive user agent. Changing this attribute changes the state of
67: * the form control, but does not change the value of the HTML selected
68: * attribute of the element.
69: */
70: public boolean getSelected();
71:
72: public void setSelected(boolean selected);
73:
74: /**
75: * The current form control value. See the value attribute definition in
76: * HTML 4.0.
77: */
78: public String getValue();
79:
80: public void setValue(String value);
81:
82: }
|