Config:
Win2000, JDK1.31, Batik1.1/1.5b

Hi,
I try to display SVGs as JTree nodes. Therefore I wrote a TreeRenderer like
this:

public class SVGTreeRenderer extends JSVGCanvas implements TreeCellRenderer
{

  public SVGTreeRenderer() {
    File f = new File("d:\\img1.svg");
    try {
      this.setURI(f.toURL().toString());
    } catch (Exception ex) {
      //...
    }
  }
  public Component getTreeCellRendererComponent(JTree tree, ...) {
    return this;
  }
}

Running this Code I get the following Exception:

java.awt.geom.NoninvertibleTransformException: Determinant is 0

     at
java.awt.geom.AffineTransform.createInverse(AffineTransform.java:1898)

     at
org.apache.batik.swing.gvt.JGVTComponent.setRenderingTransform(Unknown
Source)

     at
org.apache.batik.swing.svg.JSVGComponent.computeRenderingTransform(Unknown
Source)

     at org.apache.batik.swing.gvt.JGVTComponent.setGraphicsNode(Unknown
Source)

     at org.apache.batik.swing.svg.JSVGComponent.access$601(Unknown Source)

     at
org.apache.batik.swing.svg.JSVGComponent$SVGListener.gvtBuildCompleted(Unknown

Source)

     at org.apache.batik.swing.svg.GVTTreeBuilder$2.run(Unknown Source)

     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)

     at java.awt.EventQueue.dispatchEvent(EventQueue.java:337)

     at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)

     at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)

     at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

     at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)


At the end, there are no SVGs displayed in the JTree. Does anyone has a
solution for this problem?

cheers,

Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to