xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Bohm" <de...@fireflydesign.com>
Subject Re: svgDocument.getElementById returns null (now BridgeContext.getGraphicsNode returns null)
Date Tue, 20 Mar 2001 15:14:06 GMT
> >>  My SVG file has:
> >>
> >> <text id="dpu" x="10" y="10" class="fil2 fnt0">and</text>
>              ^^^
> >> And my Java code does:
> >>
> >> Element element = svgDocument.getElementById("alu");
>                                                  ^^^
> >> Any idea what might be happening?
>    Well, I'm hoping this is just a cut and past mistake but,
> you are aware that the id's must match, right?
>    We haven't integrated with the mind reading module yet :)

That was it!  Thanks for catching it, I must have made a brain-o when I was
cutting my code down to try to narrow the problem.

The initial problem that I was having, and am still having, is the next line
in my code where it tries to lookup the graphic node using the bridge:

        GraphicsNode node = bridgeContext.getGraphicsNode(element);

This one is returning null.  Hopefully it's not something equally as obvious
as the previous posting!

What I'm trying to do is load a document, create a JSVGComponent, add mouse
listeners to certain graphic nodes, and later update some properties (text
string, colors, visibility, mostly).  I've attached the class source and the
svg file I'm using for testing.


To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message