KickJava   Java API By Example, From Geeks To Geeks.

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


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.HTMLAreaElement;
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.HTMLAreaElement
25  * @see org.apache.xerces.dom.ElementImpl
26  */

27 public class HTMLAreaElementImpl
28     extends HTMLElementImpl
29     implements HTMLAreaElement
30 {
31
32     private static final long serialVersionUID = 3977019543719523380L;
33
34     public String JavaDoc getAccessKey()
35     {
36         String JavaDoc accessKey;
37         
38         // Make sure that the access key is a single character.
39
accessKey = getAttribute( "accesskey" );
40         if ( accessKey != null && accessKey.length() > 1 )
41             accessKey = accessKey.substring( 0, 1 );
42         return accessKey;
43     }
44     
45     
46     public void setAccessKey( String JavaDoc accessKey )
47     {
48         // Make sure that the access key is a single character.
49
if ( accessKey != null && accessKey.length() > 1 )
50             accessKey = accessKey.substring( 0, 1 );
51         setAttribute( "accesskey", accessKey );
52     }
53
54     
55     public String JavaDoc getAlt()
56     {
57         return getAttribute( "alt" );
58     }
59     
60     
61     public void setAlt( String JavaDoc alt )
62     {
63         setAttribute( "alt", alt );
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 boolean getNoHref()
91     {
92         return getBinary( "href" );
93     }
94     
95     
96     public void setNoHref( boolean noHref )
97     {
98         setAttribute( "nohref", noHref );
99     }
100     
101     
102     public String JavaDoc getShape()
103     {
104         return capitalize( getAttribute( "shape" ) );
105     }
106     
107     
108     public void setShape( String JavaDoc shape )
109     {
110         setAttribute( "shape", shape );
111     }
112
113     
114     public int getTabIndex()
115     {
116         return getInteger( getAttribute( "tabindex" ) );
117     }
118     
119     
120     public void setTabIndex( int tabIndex )
121     {
122         setAttribute( "tabindex", String.valueOf( tabIndex ) );
123     }
124
125     
126     public String JavaDoc getTarget()
127     {
128         return getAttribute( "target" );
129     }
130     
131     
132     public void setTarget( String JavaDoc target )
133     {
134         setAttribute( "target", target );
135     }
136     
137     
138     /**
139      * Constructor requires owner document.
140      *
141      * @param owner The owner HTML document
142      */

143     public HTMLAreaElementImpl( HTMLDocumentImpl owner, String JavaDoc name )
144     {
145         super( owner, name );
146     }
147     
148 }
149
150
Popular Tags