Hi Fredrik,
Fredrik Medby Hagen wrote:
I tried posting this some days ago, but got no answer. I guess something went wrong (had just registered for this mail-list), so I'm trying again.
I've successfully loaded and displayed a document by calling the loadSVGDocument [1] with an uri. But if trying the setSVGDocument [2] with a SVGDocument instance, nothing happens at [3].
gvtBuildCompleted is never called when using the setSVGDocument... Any ideas?
Unless you have any more information not really ;) How are you creating the SVG Document? You might want to read the thread about 'namespace woes'.
Sincerely, Fredrik
----CODE----
[1] svgCanvas.loadSVGDocument(someValidURI); [2] svgCanvas.setSVGDocument(someSVGDocument);
[3] waitForGVTTreeBuilding();
private void waitForGVTTreeBuilding(){
GVTTreeBuilderAdapter gvtba = new GVTTreeBuilderAdapter() {
public void gvtBuildCompleted(GVTTreeBuilderEvent evt) { synchronized(this){notify();} }
public void gvtBuildFailed(GVTTreeBuilderEvent evt){ JOptionPane.showMessageDialog(gjf,"En feil skjedde under lasting av svg. "+evt.toString(),"Feil under lasting",JOptionPane.ERROR_MESSAGE); }
public void gvtBuildCancelled(GVTTreeBuilderEvent evt){ JOptionPane.showMessageDialog(gjf,"En feil skjedde under lasting av svg. "+evt.toString(),"Feil under lasting",JOptionPane.ERROR_MESSAGE); }
};
svgCanvas.addGVTTreeBuilderListener(gvtba); try{synchronized(gvtba){gvtba.wait(0);}}catch(Exception e){e.printStackTrace();} }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
