You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Fredrik Medby Hagen <Fr...@idi.ntnu.no> on 2005/03/16 14:36:03 UTC
nothing happens when calling setSVGDocument(svgDocument)
Hi!
I've successfully loaded and displayed a document by calling the
loadSVGDocument [1] with a uri. But if trying the setSVGDocument [2] with a
SVGDocument instance, nothing happens.
gvtBuildCompleted is never called when using the setSVGDocument... Any
ideas?
Sincerely, Fredrik
[1] svgCanvas.loadSVGDocument(someValidURI);
[2] svgCanvas.setSVGDocument(someSVGDocument);
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: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org