[inkscape.git] / trunk / src / bind / java / org / inkscape / dom / svg / SVGAnimationElementImpl.java
1 /**
2 * This is a simple mechanism to bind Inkscape to Java, and thence
3 * to all of the nice things that can be layered upon that.
4 *
5 * Authors:
6 * Bob Jamison
7 *
8 * Copyright (c) 2007-2008 Inkscape.org
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 3 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 *
24 * Note that these SVG files are implementations of the Java
25 * interface package found here:
26 * http://www.w3.org/TR/SVG/java.html
27 */
29 package org.inkscape.dom.svg;
31 import org.w3c.dom.DOMException;
32 import org.w3c.dom.events.EventTarget;
33 import org.w3c.dom.smil.ElementTimeControl;
34 import org.w3c.dom.svg.*;
36 import org.w3c.dom.events.EventException;
37 import org.w3c.dom.events.Event;
38 import org.w3c.dom.events.EventListener;
42 public class SVGAnimationElementImpl
43 extends
44 SVGElementImpl
45 //SVGTests,
46 //SVGExternalResourcesRequired,
47 //ElementTimeControl,
48 //EventTarget
49 implements org.w3c.dom.svg.SVGAnimationElement
50 {
52 public SVGAnimationElementImpl()
53 {
54 imbue(_SVGTests = new SVGTestsImpl());
55 imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl());
56 imbue(_ElementTimeControl = new org.inkscape.dom.smil.ElementTimeControlImpl());
57 imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl());
58 }
60 //from SVGTests
61 private SVGTestsImpl _SVGTests;
62 public SVGStringList getRequiredFeatures()
63 { return _SVGTests.getRequiredFeatures(); }
64 public SVGStringList getRequiredExtensions()
65 { return _SVGTests.getRequiredExtensions(); }
66 public SVGStringList getSystemLanguage()
67 { return _SVGTests.getSystemLanguage(); }
68 public boolean hasExtension (String extension)
69 { return _SVGTests.hasExtension(extension); }
70 //end SVGTests
72 //from SVGExternalResourcesRequired
73 private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired;
74 public SVGAnimatedBoolean getExternalResourcesRequired()
75 { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); }
76 //end SVGExternalResourcesRequired
78 //from ElementTimeControl
79 org.inkscape.dom.smil.ElementTimeControlImpl _ElementTimeControl;
80 public boolean beginElement() throws DOMException
81 { return _ElementTimeControl.beginElement(); }
82 public boolean endElement() throws DOMException
83 { return _ElementTimeControl.endElement(); }
84 public boolean beginElementAt(float offset) throws DOMException
85 { return _ElementTimeControl.beginElementAt(offset); }
86 public boolean endElementAt(float offset) throws DOMException
87 { return _ElementTimeControl.endElementAt(offset); }
88 //end ElementTimeControl
91 //from EventTarget
92 private org.inkscape.dom.events.EventTargetImpl _EventTarget;
93 public void addEventListener(String type,
94 EventListener listener,
95 boolean useCapture)
96 { _EventTarget.addEventListener(type, listener, useCapture); }
97 public void removeEventListener(String type,
98 EventListener listener,
99 boolean useCapture)
100 { _EventTarget.removeEventListener(type, listener, useCapture); }
101 public boolean dispatchEvent(Event evt)
102 throws EventException
103 { return _EventTarget.dispatchEvent(evt); }
104 public void addEventListenerNS(String namespaceURI,
105 String type,
106 EventListener listener,
107 boolean useCapture,
108 Object evtGroup)
109 { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); }
110 public void removeEventListenerNS(String namespaceURI,
111 String type,
112 EventListener listener,
113 boolean useCapture)
114 { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); }
115 public boolean willTriggerNS(String namespaceURI,
116 String type)
117 { return _EventTarget.willTriggerNS(namespaceURI, type); }
118 public boolean hasEventListenerNS(String namespaceURI,
119 String type)
120 { return _EventTarget.hasEventListenerNS(namespaceURI, type); }
121 //end EventTarget
124 public native SVGElement getTargetElement( );
126 public native float getStartTime ( );
128 public native float getCurrentTime ( );
130 public native float getSimpleDuration ( )
131 throws DOMException;
132 }