KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > html > dom > HTMLTextAreaElementImpl


1 /*
2  * Copyright 1999,2000,2004,2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.html.dom;
17
18 import org.w3c.dom.html.HTMLTextAreaElement;
19
20 /**
21  * @xerces.internal
22  * @version $Revision: 1.9 $ $Date: 2005/04/18 01:20:21 $
23  * @author <a HREF="mailto:arkin@exoffice.com">Assaf Arkin</a>
24  * @see org.w3c.dom.html.HTMLTextAreaElement
25  * @see org.apache.xerces.dom.ElementImpl
26  */

27 public class HTMLTextAreaElementImpl
28     extends HTMLElementImpl
29     implements HTMLTextAreaElement, HTMLFormControl
30 {
31
32     private static final long serialVersionUID = 3257852073558357816L;
33
34     public String JavaDoc getDefaultValue()
35     {
36         // ! NOT FULLY IMPLEMENTED !
37
return getAttribute( "default-value" );
38     }
39     
40     
41     public void setDefaultValue( String JavaDoc defaultValue )
42     {
43         // ! NOT FULLY IMPLEMENTED !
44
setAttribute( "default-value", defaultValue );
45     }
46   
47   
48
49     public String JavaDoc getAccessKey()
50     {
51         String JavaDoc accessKey;
52         
53         // Make sure that the access key is a single character.
54
accessKey = getAttribute( "accesskey" );
55         if ( accessKey != null && accessKey.length() > 1 )
56             accessKey = accessKey.substring( 0, 1 );
57         return accessKey;
58     }
59     
60     
61     public void setAccessKey( String JavaDoc accessKey )
62     {
63         // Make sure that the access key is a single character.
64
if ( accessKey != null && accessKey.length() > 1 )
65             accessKey = accessKey.substring( 0, 1 );
66         setAttribute( "accesskey", accessKey );
67     }
68
69     
70     public int getCols()
71     {
72         return getInteger( getAttribute( "cols" ) );
73     }
74     
75     
76     public void setCols( int cols )
77     {
78         setAttribute( "cols", String.valueOf( cols ) );
79     }
80   
81   
82     public boolean getDisabled()
83     {
84         return getBinary( "disabled" );
85     }
86     
87     
88     public void setDisabled( boolean disabled )
89     {
90         setAttribute( "disabled", disabled );
91     }
92
93     
94     public String JavaDoc getName()
95     {
96         return getAttribute( "name" );
97     }
98     
99     
100     public void setName( String JavaDoc name )
101     {
102         setAttribute( "name", name );
103     }
104
105     
106     public boolean getReadOnly()
107     {
108         return getBinary( "readonly" );
109     }
110     
111     
112     public void setReadOnly( boolean readOnly )
113     {
114         setAttribute( "readonly", readOnly );
115     }
116
117     
118        public int getRows()
119     {
120         return getInteger( getAttribute( "rows" ) );
121     }
122     
123     
124     public void setRows( int rows )
125     {
126         setAttribute( "rows", String.valueOf( rows ) );
127     }
128
129   
130        public int getTabIndex()
131     {
132         return getInteger( getAttribute( "tabindex" ) );
133     }
134     
135     
136     public void setTabIndex( int tabIndex )
137     {
138         setAttribute( "tabindex", String.valueOf( tabIndex ) );
139     }
140
141   
142     public String JavaDoc getType()
143     {
144         return getAttribute( "type" );
145     }
146
147     
148       public String JavaDoc getValue()
149     {
150         return getAttribute( "value" );
151     }
152     
153     
154     public void setValue( String JavaDoc value )
155     {
156         setAttribute( "value", value );
157     }
158
159     
160     public void blur()
161     {
162         // No scripting in server-side DOM. This method is moot.
163
}
164     
165     
166     public void focus()
167     {
168         // No scripting in server-side DOM. This method is moot.
169
}
170     
171     
172     public void select()
173     {
174         // No scripting in server-side DOM. This method is moot.
175
}
176     
177       
178       /**
179      * Constructor requires owner document.
180      *
181      * @param owner The owner HTML document
182      */

183     public HTMLTextAreaElementImpl( HTMLDocumentImpl owner, String JavaDoc name )
184     {
185         super( owner, name );
186     }
187
188   
189 }
190
191
Popular Tags