Code

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