Code

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