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 */
30 package org.inkscape.dom.svg;
32 import org.w3c.dom.DOMException;
34 import org.w3c.dom.svg.*;
36 import org.w3c.dom.css.CSSStyleDeclaration;
37 import org.w3c.dom.css.CSSValue;
39 import org.w3c.dom.events.Event;
40 import org.w3c.dom.events.EventTarget;
41 import org.w3c.dom.events.EventException;
42 import org.w3c.dom.events.EventListener;
45 public class SVGAElementImpl
46 extends
47 SVGElementImpl
48 //SVGURIReference,
49 //SVGTests,
50 //SVGLangSpace,
51 //SVGExternalResourcesRequired,
52 //SVGStylable,
53 //SVGTransformable,
54 //EventTarget
55 implements org.w3c.dom.svg.SVGAElement
56 {
57 public SVGAElementImpl()
58 {
59 imbue(_SVGURIReference = new SVGURIReferenceImpl());
60 imbue(_SVGTests = new SVGTestsImpl());
61 imbue(_SVGLangSpace = new SVGLangSpaceImpl());
62 imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl());
63 imbue(_SVGStylable = new SVGStylableImpl());
64 imbue(_SVGTransformable = new SVGTransformableImpl());
65 imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl());
66 }
70 //from SVGURIReference
71 private SVGURIReferenceImpl _SVGURIReference;
72 public SVGAnimatedString getHref( )
73 {
74 return _SVGURIReference.getHref( );
75 }
76 //end SVGURIReference
78 //from SVGTests
79 private SVGTestsImpl _SVGTests;
80 public SVGStringList getRequiredFeatures()
81 { return _SVGTests.getRequiredFeatures(); }
82 public SVGStringList getRequiredExtensions()
83 { return _SVGTests.getRequiredExtensions(); }
84 public SVGStringList getSystemLanguage()
85 { return _SVGTests.getSystemLanguage(); }
86 public boolean hasExtension (String extension)
87 { return _SVGTests.hasExtension(extension); }
88 //end SVGTests
90 //from SVGLangSpace
91 private SVGLangSpaceImpl _SVGLangSpace;
92 public String getXMLlang()
93 { return _SVGLangSpace.getXMLlang(); }
94 public void setXMLlang(String xmllang)
95 throws DOMException
96 { _SVGLangSpace.setXMLlang(xmllang); }
97 public String getXMLspace()
98 { return _SVGLangSpace.getXMLspace(); }
99 public void setXMLspace(String xmlspace)
100 throws DOMException
101 { _SVGLangSpace.setXMLspace(xmlspace); }
102 //end SVGLangSpace
104 //from SVGExternalResourcesRequired
105 private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired;
106 public SVGAnimatedBoolean getExternalResourcesRequired()
107 { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); }
108 //end SVGExternalResourcesRequired
110 //from SVGStylable
111 private SVGStylableImpl _SVGStylable;
112 public SVGAnimatedString getClassName()
113 { return _SVGStylable.getClassName(); }
114 public CSSStyleDeclaration getStyle()
115 { return _SVGStylable.getStyle(); }
116 public CSSValue getPresentationAttribute(String name)
117 { return _SVGStylable.getPresentationAttribute(name); }
118 //end SVGStylable
120 //from SVGTransformable
121 private SVGTransformableImpl _SVGTransformable;
122 public SVGAnimatedTransformList getTransform()
123 { return _SVGTransformable.getTransform(); }
124 //end SVGTransformable
126 //from SVGLocatable (from SVGTransformable)
127 public SVGElement getNearestViewportElement()
128 { return _SVGTransformable.getNearestViewportElement(); }
129 public SVGElement getFarthestViewportElement()
130 { return _SVGTransformable.getFarthestViewportElement(); }
131 public SVGRect getBBox()
132 { return _SVGTransformable.getBBox(); }
133 public SVGMatrix getCTM()
134 { return _SVGTransformable.getCTM(); }
135 public SVGMatrix getScreenCTM()
136 { return _SVGTransformable.getScreenCTM(); }
137 public SVGMatrix getTransformToElement (SVGElement element)
138 throws SVGException
139 { return _SVGTransformable.getTransformToElement(element); }
140 //end SVGLocatable
142 //from EventTarget
143 private org.inkscape.dom.events.EventTargetImpl _EventTarget;
144 public void addEventListener(String type,
145 EventListener listener,
146 boolean useCapture)
147 { _EventTarget.addEventListener(type, listener, useCapture); }
148 public void removeEventListener(String type,
149 EventListener listener,
150 boolean useCapture)
151 { _EventTarget.removeEventListener(type, listener, useCapture); }
152 public boolean dispatchEvent(Event evt)
153 throws EventException
154 { return _EventTarget.dispatchEvent(evt); }
155 public void addEventListenerNS(String namespaceURI,
156 String type,
157 EventListener listener,
158 boolean useCapture,
159 Object evtGroup)
160 { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); }
161 public void removeEventListenerNS(String namespaceURI,
162 String type,
163 EventListener listener,
164 boolean useCapture)
165 { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); }
166 public boolean willTriggerNS(String namespaceURI,
167 String type)
168 { return _EventTarget.willTriggerNS(namespaceURI, type); }
169 public boolean hasEventListenerNS(String namespaceURI,
170 String type)
171 { return _EventTarget.hasEventListenerNS(namespaceURI, type); }
172 //end EventTarget
175 public native SVGAnimatedString getTarget( );
178 }