You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2008/05/02 07:48:19 UTC
svn commit: r652770 -
/xmlgraphics/batik/trunk/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java
Author: cam
Date: Thu May 1 22:48:19 2008
New Revision: 652770
URL: http://svn.apache.org/viewvc?rev=652770&view=rev
Log:
Expose Intepreters from JSVGComponent, to make it easier to interact with
the script environment in Swing applications.
Modified:
xmlgraphics/batik/trunk/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java?rev=652770&r1=652769&r2=652770&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/swing/svg/AbstractJSVGComponent.java Thu May 1 22:48:19 2008
@@ -69,6 +69,7 @@
import org.apache.batik.gvt.event.EventDispatcher;
import org.apache.batik.gvt.text.Mark;
import org.apache.batik.gvt.renderer.ImageRenderer;
+import org.apache.batik.script.Interpreter;
import org.apache.batik.swing.gvt.GVTTreeRendererEvent;
import org.apache.batik.swing.gvt.JGVTComponent;
import org.apache.batik.swing.gvt.JGVTComponentListener;
@@ -1322,6 +1323,19 @@
}
/**
+ * Returns the {@link Interpreter} being used for script of the given
+ * MIME type.
+ *
+ * @param type The MIME type the returned <code>Interpreter</code> handles.
+ */
+ public Interpreter getInterpreter(String type) {
+ if (bridgeContext != null) {
+ return bridgeContext.getInterpreter(type);
+ }
+ return null;
+ }
+
+ /**
* Sets the animation limiting mode on the current bridge context.
*/
protected void setBridgeContextAnimationLimitingMode() {