KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > batik > dom > svg > SVGOMAnimatedString


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

18 package org.apache.batik.dom.svg;
19
20 import org.w3c.dom.Attr JavaDoc;
21 import org.w3c.dom.DOMException JavaDoc;
22 import org.w3c.dom.svg.SVGAnimatedString;
23
24 /**
25  * This class implements the {@link SVGAnimatedString} interface.
26  *
27  * @author <a HREF="mailto:stephane@hillion.org">Stephane Hillion</a>
28  * @version $Id: SVGOMAnimatedString.java,v 1.7 2004/08/18 07:13:14 vhardy Exp $
29  */

30 public class SVGOMAnimatedString
31     implements SVGAnimatedString,
32                LiveAttributeValue {
33
34     /**
35      * The associated element.
36      */

37     protected AbstractElement element;
38
39     /**
40      * The attribute's namespace URI.
41      */

42     protected String JavaDoc namespaceURI;
43
44     /**
45      * The attribute's local name.
46      */

47     protected String JavaDoc localName;
48
49     /**
50      * Creates a new SVGOMAnimatedString.
51      * @param elt The associated element.
52      * @param ns The attribute's namespace URI.
53      * @param ln The attribute's local name.
54      */

55     public SVGOMAnimatedString(AbstractElement elt,
56                                String JavaDoc ns,
57                                String JavaDoc ln) {
58         element = elt;
59         namespaceURI = ns;
60         localName = ln;
61     }
62
63     /**
64      * <b>DOM</b>: Implements {@link SVGAnimatedString#getBaseVal()}.
65      */

66     public String JavaDoc getBaseVal() {
67         return element.getAttributeNS(namespaceURI, localName);
68     }
69
70     /**
71      * <b>DOM</b>: Implements {@link SVGAnimatedString#setBaseVal(String)}.
72      */

73     public void setBaseVal(String JavaDoc baseVal) throws DOMException JavaDoc {
74         element.setAttributeNS(namespaceURI, localName, baseVal);
75     }
76
77     /**
78      * <b>DOM</b>: Implements {@link SVGAnimatedString#getAnimVal()}.
79      */

80     public String JavaDoc getAnimVal() {
81         throw new RuntimeException JavaDoc("!!! TODO: getAnimVal()");
82     }
83
84     /**
85      * Called when an Attr node has been added.
86      */

87     public void attrAdded(Attr JavaDoc node, String JavaDoc newv) {
88     }
89
90     /**
91      * Called when an Attr node has been modified.
92      */

93     public void attrModified(Attr JavaDoc node, String JavaDoc oldv, String JavaDoc newv) {
94     }
95
96     /**
97      * Called when an Attr node has been removed.
98      */

99     public void attrRemoved(Attr JavaDoc node, String JavaDoc oldv) {
100     }
101 }
102
Popular Tags