Code

Start working toward multiple inheritance
[inkscape.git] / src / bind / java / org / inkscape / dom / svg / SVGAElementImpl.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  */
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 //from SVGURIReference
58 private SVGURIReferenceImpl _SVGURIReference;
59 public SVGAnimatedString getHref( )
60 {
61     return _SVGURIReference.getHref( );
62 }
63 //end SVGURIReference
65 //from SVGTests
66 private SVGTestsImpl _SVGTests;
67 public SVGStringList getRequiredFeatures()
68    { return _SVGTests.getRequiredFeatures(); }
69 public SVGStringList getRequiredExtensions()
70    { return _SVGTests.getRequiredExtensions(); }
71 public SVGStringList getSystemLanguage()
72    { return _SVGTests.getSystemLanguage(); }
73 public boolean hasExtension (String extension)
74    { return _SVGTests.hasExtension(extension); }
75 //end SVGTests
77 //from SVGLangSpace
78 private SVGLangSpaceImpl _SVGLangSpace;
79 public String getXMLlang()
80     { return _SVGLangSpace.getXMLlang(); }
81 public void setXMLlang(String xmllang)
82                        throws DOMException
83     { _SVGLangSpace.setXMLlang(xmllang); }
84 public String getXMLspace()
85     { return _SVGLangSpace.getXMLspace(); }
86 public void setXMLspace(String xmlspace)
87                        throws DOMException
88     { _SVGLangSpace.setXMLspace(xmlspace); }
89 //end SVGLangSpace
91 //from SVGExternalResourcesRequired
92 private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired;
93 public SVGAnimatedBoolean getExternalResourcesRequired()
94     { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); }
95 //end SVGExternalResourcesRequired
97 //from SVGStylable
98 private SVGStylableImpl _SVGStylable;
99 public SVGAnimatedString getClassName()
100     { return _SVGStylable.getClassName(); }
101 public CSSStyleDeclaration getStyle()
102     { return _SVGStylable.getStyle(); }
103 public CSSValue getPresentationAttribute(String name)
104     { return _SVGStylable.getPresentationAttribute(name); }
105 //end SVGStylable
107 //from SVGTransformable
108 private SVGTransformableImpl _SVGTransformable;
109 public SVGAnimatedTransformList getTransform()
110     { return _SVGTransformable.getTransform(); }
111 //end SVGTransformable
113 //from SVGLocatable (from SVGTransformable)
114 public SVGElement getNearestViewportElement()
115     { return _SVGTransformable.getNearestViewportElement(); }
116 public SVGElement getFarthestViewportElement()
117     { return _SVGTransformable.getFarthestViewportElement(); }
118 public SVGRect getBBox()
119     { return _SVGTransformable.getBBox(); }
120 public SVGMatrix getCTM()
121     { return _SVGTransformable.getCTM(); }
122 public SVGMatrix getScreenCTM()
123     { return _SVGTransformable.getScreenCTM(); }
124 public SVGMatrix getTransformToElement (SVGElement element)
125                   throws SVGException
126     { return _SVGTransformable.getTransformToElement(element); }
127 //end SVGLocatable
129 //from EventTarget
130 private org.inkscape.dom.events.EventTargetImpl _EventTarget;
131 public void addEventListener(String type,
132                              EventListener listener,
133                              boolean useCapture)
134     { _EventTarget.addEventListener(type, listener, useCapture); }
135 public void removeEventListener(String type,
136                                 EventListener listener,
137                                 boolean useCapture)
138     { _EventTarget.removeEventListener(type, listener, useCapture); }
139 public boolean dispatchEvent(Event evt)
140                              throws EventException
141     { return _EventTarget.dispatchEvent(evt); }
142 public void addEventListenerNS(String namespaceURI,
143                                String type,
144                                EventListener listener,
145                                boolean useCapture,
146                                Object evtGroup)
147     { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); }
148 public void removeEventListenerNS(String namespaceURI,
149                                   String type,
150                                   EventListener listener,
151                                   boolean useCapture)
152     { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); }
153 public boolean willTriggerNS(String namespaceURI,
154                              String type)
155     { return _EventTarget.willTriggerNS(namespaceURI, type); }
156 public boolean hasEventListenerNS(String namespaceURI,
157                                   String type)
158     { return _EventTarget.hasEventListenerNS(namespaceURI, type); }
159 //end EventTarget
162 public native SVGAnimatedString getTarget( );
165 public SVGAElementImpl()
167      imbue(_SVGURIReference = new SVGURIReferenceImpl());
168      imbue(_SVGTests = new SVGTestsImpl());
169      imbue(_SVGLangSpace = new SVGLangSpaceImpl());
170      imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl());
171      imbue(_SVGStylable = new SVGStylableImpl());
172      imbue(_SVGTransformable = new SVGTransformableImpl());
173      imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl());