KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > enhydra > xml > xhtml > dom > xerces > XHTMLFormElementImpl


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Original Code is DigitalSesame
15  * Portions created by DigitalSesame are Copyright (C) 1997-2000 DigitalSesame
16  * All Rights Reserved.
17  *
18  * Contributor(s):
19  * Rex Tsai <chihchun@digitalsesame.com>
20  * David Li <david@digitalsesam.com>
21  *
22  * $Id: XHTMLFormElementImpl.java,v 1.3 2005/01/26 08:28:45 jkjome Exp $
23  */

24
25 package org.enhydra.xml.xhtml.dom.xerces;
26
27 import org.w3c.dom.NodeList JavaDoc;
28 import org.w3c.dom.html.HTMLCollection;
29
30 public class XHTMLFormElementImpl
31     extends XHTMLElementImpl
32     implements org.enhydra.xml.xhtml.dom.XHTMLFormElement
33 {
34
35     public XHTMLFormElementImpl (XHTMLDocumentBase owner, String JavaDoc namespaceURI, String JavaDoc tagName) {
36     super( owner, namespaceURI, tagName);
37     }
38
39     /*
40      * Explicit implementation of getChildNodes() to avoid problems with
41      * overriding the getLength() method hidden in the super class.
42      */

43     public NodeList JavaDoc getChildNodes() {
44         return getChildNodesUnoptimized();
45     }
46
47         public void setId (String JavaDoc newValue) {
48     setAttribute("id", newValue);
49     }
50
51     public String JavaDoc getId () {
52     return getAttribute ("id");
53     }
54     public void setLang (String JavaDoc newValue) {
55     setAttribute("lang", newValue);
56     }
57
58     public String JavaDoc getLang () {
59     return getAttribute ("lang");
60     }
61     public void setDir (String JavaDoc newValue) {
62     setAttribute("dir", newValue);
63     }
64
65     public String JavaDoc getDir () {
66     return getAttribute ("dir");
67     }
68     public void setClassName (String JavaDoc newValue) {
69     setAttribute("class", newValue);
70     }
71
72     public String JavaDoc getClassName () {
73     return getAttribute ("class");
74     }
75     public void setTitle (String JavaDoc newValue) {
76     setAttribute("title", newValue);
77     }
78
79     public String JavaDoc getTitle () {
80     return getAttribute ("title");
81     }
82     public void setName (String JavaDoc newValue) {
83     setAttribute("name", newValue);
84     }
85
86     public String JavaDoc getName () {
87     return getAttribute ("name");
88     }
89     public void setMethod (String JavaDoc newValue) {
90     setAttribute("method", newValue);
91     }
92
93     public String JavaDoc getMethod () {
94     return getAttribute ("method");
95     }
96     public void setTarget (String JavaDoc newValue) {
97     setAttribute("target", newValue);
98     }
99
100     public String JavaDoc getTarget () {
101     return getAttribute ("target");
102     }
103     public void setAcceptCharset (String JavaDoc newValue) {
104     setAttribute("accept-charset", newValue);
105     }
106
107     public String JavaDoc getAcceptCharset () {
108     return getAttribute ("accept-charset");
109     }
110     public void setAction (String JavaDoc newValue) {
111     setAttribute("action", newValue);
112     }
113
114     public String JavaDoc getAction () {
115     return getAttribute ("action");
116     }
117     public void setEnctype (String JavaDoc newValue) {
118     setAttribute("enctype", newValue);
119     }
120
121     public String JavaDoc getEnctype () {
122     return getAttribute ("enctype");
123     }
124     public void setOnKeyUp (String JavaDoc newValue) {
125     setAttribute("onkeyup", newValue);
126     }
127
128     public String JavaDoc getOnKeyUp () {
129     return getAttribute ("onkeyup");
130     }
131     public void setStyle (String JavaDoc newValue) {
132     setAttribute("style", newValue);
133     }
134
135     public String JavaDoc getStyle () {
136     return getAttribute ("style");
137     }
138     public void setOnMouseDown (String JavaDoc newValue) {
139     setAttribute("onmousedown", newValue);
140     }
141
142     public String JavaDoc getOnMouseDown () {
143     return getAttribute ("onmousedown");
144     }
145     public void setOnKeyPress (String JavaDoc newValue) {
146     setAttribute("onkeypress", newValue);
147     }
148
149     public String JavaDoc getOnKeyPress () {
150     return getAttribute ("onkeypress");
151     }
152     public void setOnDblClick (String JavaDoc newValue) {
153     setAttribute("ondblclick", newValue);
154     }
155
156     public String JavaDoc getOnDblClick () {
157     return getAttribute ("ondblclick");
158     }
159     public void setOnKeyDown (String JavaDoc newValue) {
160     setAttribute("onkeydown", newValue);
161     }
162
163     public String JavaDoc getOnKeyDown () {
164     return getAttribute ("onkeydown");
165     }
166     public void setOnMouseMove (String JavaDoc newValue) {
167     setAttribute("onmousemove", newValue);
168     }
169
170     public String JavaDoc getOnMouseMove () {
171     return getAttribute ("onmousemove");
172     }
173     public void setOnMouseUp (String JavaDoc newValue) {
174     setAttribute("onmouseup", newValue);
175     }
176
177     public String JavaDoc getOnMouseUp () {
178     return getAttribute ("onmouseup");
179     }
180     public void setXmlLang (String JavaDoc newValue) {
181     setAttribute("xml:lang", newValue);
182     }
183
184     public String JavaDoc getXmlLang () {
185     return getAttribute ("xml:lang");
186     }
187     public void setOnMouseOut (String JavaDoc newValue) {
188     setAttribute("onmouseout", newValue);
189     }
190
191     public String JavaDoc getOnMouseOut () {
192     return getAttribute ("onmouseout");
193     }
194     public void setOnClick (String JavaDoc newValue) {
195     setAttribute("onclick", newValue);
196     }
197
198     public String JavaDoc getOnClick () {
199     return getAttribute ("onclick");
200     }
201     public void setOnMouseOver (String JavaDoc newValue) {
202     setAttribute("onmouseover", newValue);
203     }
204
205     public String JavaDoc getOnMouseOver () {
206     return getAttribute ("onmouseover");
207     }
208     public void setAccept (String JavaDoc newValue) {
209     setAttribute("accept", newValue);
210     }
211
212     public String JavaDoc getAccept () {
213     return getAttribute ("accept");
214     }
215     public void setOnReset (String JavaDoc newValue) {
216     setAttribute("onreset", newValue);
217     }
218
219     public String JavaDoc getOnReset () {
220     return getAttribute ("onreset");
221     }
222     public void setOnsubmit (String JavaDoc newValue) {
223     setAttribute("onsubmit", newValue);
224     }
225
226     public String JavaDoc getOnsubmit () {
227     return getAttribute ("onsubmit");
228     }
229 ;
230
231         public HTMLCollection getElements()
232     {
233         if ( _elements == null )
234             _elements = new XHTMLCollectionImpl( this, XHTMLCollectionImpl.ELEMENT );
235         return _elements;
236     }
237   
238     public int getLength()
239     {
240         return getElements().getLength();
241     }
242   
243     public void submit()
244     {
245         // No scripting in server-side DOM. This method is moot.
246
}
247
248     
249     public void reset()
250     {
251         // No scripting in server-side DOM. This method is moot.
252
}
253
254     /**
255      * Collection of all elements contained in this FORM.
256      */

257     private XHTMLCollectionImpl _elements;
258
259
260 ;
261 }
262
263
264
Popular Tags