Hi Mistercaste,

mistercaste <[email protected]> wrote on 10/21/2009 03:19:42 PM:

> I realized that in the BridgeContext class when i get a GraphicsNode 
like in
> the following code i get a null return value.
> 
> 
> BridgeContext bc = 
((JSVGCanvas)c).getUpdateManager().getBridgeContext();
> GraphicsNode gn = (GraphicsNode)bc.getGraphicsNode(element);
> System.out.println(gn);
> 
> What can I do? The "c" element is an element i get by clicking on the
> canvas, 

    This doesn't make sense, "c" must be the JSVGCanvas (otherwise the
cast would fail).   I'm much more interested in knowing where 'element'
comes from.

> so it shouldn't give any problem, but when i get it's BridgeContext
> (which is not null) I can't get the corresponding element.

    Typically the problem is that 'element' isn't the right element.
There can be a number of possible reasons for this.  How do you get
'element' and what does the structure of the SVG document look like
around the element you are trying to find the GN for?


 

Reply via email to