KickJava   Java API By Example, From Geeks To Geeks.

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


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.HTMLAnchorElement;
19
20 /**
21  * @xerces.internal
22  * @version $Revision: 1.9 $ $Date: 2005/04/18 00:36:15 $
23  * @author <a HREF="mailto:arkin@exoffice.com">Assaf Arkin</a>
24  * @see org.w3c.dom.html.HTMLAnchorElement
25  * @see org.apache.xerces.dom.ElementImpl
26  */

27 public class HTMLAnchorElementImpl
28     extends HTMLElementImpl
29     implements HTMLAnchorElement
30 {
31     private static final long serialVersionUID = 3256441387221334069L;
32
33     public String JavaDoc getAccessKey()
34     {
35         String JavaDoc accessKey;
36         
37         // Make sure that the access key is a single character.
38
accessKey = getAttribute( "accesskey" );
39         if ( accessKey != null && accessKey.length() > 1 )
40             accessKey = accessKey.substring( 0, 1 );
41         return accessKey;
42     }
43     
44     
45     public void setAccessKey( String JavaDoc accessKey )
46     {
47         // Make sure that the access key is a single character.
48
if ( accessKey != null && accessKey.length() > 1 )
49             accessKey = accessKey.substring( 0, 1 );
50         setAttribute( "accesskey", accessKey );
51     }
52
53     
54     public String JavaDoc getCharset()
55     {
56         return getAttribute( "charset" );
57     }
58     
59     
60     public void setCharset( String JavaDoc charset )
61     {
62         setAttribute( "charset", charset );
63     }
64     
65     
66     public String JavaDoc getCoords()
67     {
68         return getAttribute( "coords" );
69     }
70     
71     
72     public void setCoords( String JavaDoc coords )
73     {
74         setAttribute( "coords", coords );
75     }
76   
77   
78     public String JavaDoc getHref()
79     {
80         return getAttribute( "href" );
81     }
82     
83     
84     public void setHref( String JavaDoc href )
85     {
86         setAttribute( "href", href );
87     }
88     
89     
90     public String JavaDoc getHreflang()
91     {
92         return getAttribute( "hreflang" );
93     }
94     
95     
96     public void setHreflang( String JavaDoc hreflang )
97     {
98         setAttribute( "hreflang", hreflang );
99     }
100   
101   
102     public String JavaDoc getName()
103     {
104         return getAttribute( "name" );
105     }
106     
107     
108     public void setName( String JavaDoc name )
109     {
110         setAttribute( "name", name );
111     }
112     
113     
114     public String JavaDoc getRel()
115     {
116         return getAttribute( "rel" );
117     }
118     
119     
120     public void setRel( String JavaDoc rel )
121     {
122         setAttribute( "rel", rel );
123     }
124
125     
126     public String JavaDoc getRev()
127     {
128         return getAttribute( "rev" );
129     }
130     
131     
132     public void setRev( String JavaDoc rev )
133     {
134         setAttribute( "rev", rev );
135     }
136
137
138     public String JavaDoc getShape()
139     {
140         return capitalize( getAttribute( "shape" ) );
141     }
142     
143     
144     public void setShape( String JavaDoc shape )
145     {
146         setAttribute( "shape", shape );
147     }
148   
149
150     public int getTabIndex()
151     {
152         return this.getInteger( getAttribute( "tabindex" ) );
153     }
154     
155     
156     public void setTabIndex( int tabIndex )
157     {
158         setAttribute( "tabindex", String.valueOf( tabIndex ) );
159     }
160
161   
162     public String JavaDoc getTarget()
163     {
164         return getAttribute( "target" );
165     }
166     
167     
168     public void setTarget( String JavaDoc target )
169     {
170         setAttribute( "target", target );
171     }
172     
173     
174     public String JavaDoc getType()
175     {
176         return getAttribute( "type" );
177     }
178     
179     
180     public void setType( String JavaDoc type )
181     {
182         setAttribute( "type", type );
183     }
184
185     
186     public void blur()
187     {
188         // No scripting in server-side DOM. This method is moot.
189
}
190     
191     public void focus()
192     {
193         // No scripting in server-side DOM. This method is moot.
194
}
195   
196   
197       /**
198      * Constructor requires owner document.
199      *
200      * @param owner The owner HTML document
201      */

202     public HTMLAnchorElementImpl( HTMLDocumentImpl owner, String JavaDoc name )
203     {
204         super( owner, name );
205     }
206
207   
208 }
209
210
Popular Tags