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 Wed, 21 Mar 2001 04:58:21 GMT
I figured out what's happening.  There is another thread that is kicked off
after the document load that builds the svg, and it hasn't finished yet when
I try to do the lookup.  It looks like the best thing for me to do is to
write my own component (similar to JSVGComponent) where I can control the
flow.

Thanks,
  Denis

----- Original Message -----
From: "Denis Bohm" <denis@fireflydesign.com>
To: "Batik Users" <batik-users@xml.apache.org>
Sent: Tuesday, March 20, 2001 7:35 AM
Subject: Fw: svgDocument.getElementById returns null (now
BridgeContext.getGraphicsNode returns null)


> Here are the attachments.
>
> ----- Original Message -----
> From: "Denis Bohm" <denis@fireflydesign.com>
> To: "Batik Users" <batik-users@xml.apache.org>
> Sent: Tuesday, March 20, 2001 7:14 AM
> Subject: Re: svgDocument.getElementById returns null (now
> BridgeContext.getGraphicsNode returns null)
>
>
> > > >>  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.
> >
> > Thanks,
> >   Denis
> >
>


----------------------------------------------------------------------------
----


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


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


Mime
View raw message