You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by tk...@apache.org on 2001/04/13 19:09:09 UTC
cvs commit: xml-batik/sources/org/apache/batik/swing/svg GVTTreeBuilderAdapter.java SVGDocumentLoaderAdapter.java JSVGComponent.java
tkormann 01/04/13 10:09:09
Modified: sources/org/apache/batik/swing/svg JSVGComponent.java
Added: sources/org/apache/batik/swing/svg
GVTTreeBuilderAdapter.java
SVGDocumentLoaderAdapter.java
Log:
bug fix when trying to see a DOM tree (without starting from a URI)
Revision Changes Path
1.12 +4 -1 xml-batik/sources/org/apache/batik/swing/svg/JSVGComponent.java
Index: JSVGComponent.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/swing/svg/JSVGComponent.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- JSVGComponent.java 2001/04/12 16:06:05 1.11
+++ JSVGComponent.java 2001/04/13 17:09:09 1.12
@@ -61,7 +61,7 @@
* This class represents a Swing component which can display SVG.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: JSVGComponent.java,v 1.11 2001/04/12 16:06:05 hillion Exp $
+ * @version $Id: JSVGComponent.java,v 1.12 2001/04/13 17:09:09 tkormann Exp $
*/
public class JSVGComponent extends JGVTComponent {
@@ -212,6 +212,9 @@
throw new IllegalArgumentException("Invalid DOM implementation.");
}
svgDocument = doc;
+ if (loader == null) {
+ loader = new DocumentLoader(userAgent.getXMLParserClassName());
+ }
DefaultSVGContext ctx = (DefaultSVGContext)((SVGOMDocument)doc).getSVGContext();
ctx.setUserStyleSheetURI(userAgent.getUserStyleSheetURI());
1.1 xml-batik/sources/org/apache/batik/swing/svg/GVTTreeBuilderAdapter.java
Index: GVTTreeBuilderAdapter.java
===================================================================
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* version 1.1, a copy of which has been included with this distribution in *
* the LICENSE file. *
*****************************************************************************/
package org.apache.batik.swing.svg;
/**
* An adapter class that represents a listener to the GVTTreeBuilderEvent
* events.
*
* @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
* @version $Id: GVTTreeBuilderAdapter.java,v 1.1 2001/04/13 17:09:09 tkormann Exp $
*/
public abstract class GVTTreeBuilderAdapter implements GVTTreeBuilderListener {
/**
* Called when a build started.
* The data of the event is initialized to the old document.
*/
public void gvtBuildStarted(GVTTreeBuilderEvent e) {}
/**
* Called when a build was completed.
*/
public void gvtBuildCompleted(GVTTreeBuilderEvent e) {}
/**
* Called when a build was cancelled.
*/
public void gvtBuildCancelled(GVTTreeBuilderEvent e) {}
/**
* Called when a build failed.
*/
public void gvtBuildFailed(GVTTreeBuilderEvent e) {}
}
1.1 xml-batik/sources/org/apache/batik/swing/svg/SVGDocumentLoaderAdapter.java
Index: SVGDocumentLoaderAdapter.java
===================================================================
/*****************************************************************************
* Copyright (C) The Apache Software Foundation. All rights reserved. *
* ------------------------------------------------------------------------- *
* This software is published under the terms of the Apache Software License *
* version 1.1, a copy of which has been included with this distribution in *
* the LICENSE file. *
*****************************************************************************/
package org.apache.batik.swing.svg;
/**
* An adapter class that represents a listener to the SVGDocumentLoaderEvent
* events.
*
* @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
* @version $Id: SVGDocumentLoaderAdapter.java,v 1.1 2001/04/13 17:09:09 tkormann Exp $
*/
public abstract class SVGDocumentLoaderAdapter
implements SVGDocumentLoaderListener {
/**
* Called when the loading of a document was started.
*/
public void documentLoadingStarted(SVGDocumentLoaderEvent e) {}
/**
* Called when the loading of a document was completed.
*/
public void documentLoadingCompleted(SVGDocumentLoaderEvent e) {}
/**
* Called when the loading of a document was cancelled.
*/
public void documentLoadingCancelled(SVGDocumentLoaderEvent e) {}
/**
* Called when the loading of a document has failed.
*/
public void documentLoadingFailed(SVGDocumentLoaderEvent e) {}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org