Hi !
I have got some problems with the dynamic update too ...
some general points are that you have to set
svgCanvas.setDocumentState(JSVGComponent.ALWAYS_DYNAMIC);
and you have to use the updateQueue to get the dynamic updates to be performed
UpdateManager um = this.getUpdateManager();
RunnableQueue rq = um.getUpdateRunnableQueue();
rq.invokeLater( new Runnable( ){
public void run( ){
// do your DOM-changes here
}
});
My problem is that there "sometimes" is no updateManager for my JSVGCanvas allthough
the document is set) and that "sometimes" the updateRunnableQueue is not running when
I call invokeLater.
Can I perform several changes in one call of invokeLater or do I have to call it
seperately for every single attribute change (etc.) ?
Is there a good working example for using the updateRunnableQueue - I don't mean one
where the whole document changes but where only some fragments change (like the
visibility for example) ?
Greetings,
Christian.
> -----Urspr�ngliche Nachricht-----
> Von: josh [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 20. M�rz 2003 06:41
> An: [EMAIL PROTECTED]
> Betreff: Dynamic DOM updates
>
>
> Hi!
>
> I've been crawling through the mail archives and I can't seem
> to find an
> answer to my question. Please forgive me if this has been asked a
> hojillion times already:
>
> I'm trying to dynamically control the SVG document through the DOM
> API. For instance, say I have a JTextField and when the user
> types in an
> id, I do this:
>
> String id = textfield.getText();
> Element elt = svgdoc.getElementById(id);
> if(elt != null){
> elt.setAttributeNS(svgns, "visibility", "hidden");
> }
> //...
>
> There's no errors, but I never see the display update. I'm
> using the 1.5b4
> release.
>
> Do DOM events not trigger display updates still? I found a
> message that
> said so, but it was dated 2001, so I figured maybe some progress had
> occurred in that area =)
>
> Thanks again for any help,
>
> - josh
>
>
> ---------------------------------------------------------------------
> 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]