KickJava   Java API By Example, From Geeks To Geeks.

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


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.HTMLCollection;
19 import org.w3c.dom.html.HTMLMapElement;
20 import org.w3c.dom.Node JavaDoc;
21
22 /**
23  * @xerces.internal
24  * @version $Revision: 1.10 $ $Date: 2005/04/18 01:09:10 $
25  * @author <a HREF="mailto:arkin@exoffice.com">Assaf Arkin</a>
26  * @see org.w3c.dom.html.HTMLMapElement
27  * @see org.apache.xerces.dom.ElementImpl
28  */

29 public class HTMLMapElementImpl
30     extends HTMLElementImpl
31     implements HTMLMapElement
32 {
33
34     private static final long serialVersionUID = 3257847692725270834L;
35
36     public HTMLCollection getAreas()
37     {
38         if ( _areas == null )
39             _areas = new HTMLCollectionImpl( this, HTMLCollectionImpl.AREA );
40         return _areas;
41     }
42     
43   
44       public String JavaDoc getName()
45     {
46         return getAttribute( "name" );
47     }
48     
49     
50     public void setName( String JavaDoc name )
51     {
52         setAttribute( "name", name );
53     }
54     
55     /**
56      * Explicit implementation of cloneNode() to ensure that cache used
57      * for getAreas() gets cleared.
58      */

59     public Node JavaDoc cloneNode( boolean deep )
60     {
61         HTMLMapElementImpl clonedNode = (HTMLMapElementImpl)super.cloneNode( deep );
62         clonedNode._areas = null;
63         return clonedNode;
64     }
65
66     /**
67      * Constructor requires owner document.
68      *
69      * @param owner The owner HTML document
70      */

71     public HTMLMapElementImpl( HTMLDocumentImpl owner, String JavaDoc name )
72     {
73         super( owner, name );
74     }
75     
76     
77     private HTMLCollection _areas;
78
79
80 }
81
82
Popular Tags