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 "Reinhard X. Fuerst" <rx...@rexfue.de> on 2006/03/19 18:55:23 UTC
Refresh JCanvas after changing attribute
Hi,
I want some elements in my SVG-grafik to blink.
I try to do this with switching the display attribute between 'inline'
an 'none'.
If i do 'document.getElementById("Sonne").setAttribute("display","none")'
and
'....,"inline") in the eventhandler for mouse-actions, it works fine.
But if I do the same calls in the 'actionPerformed' of a swing-timer,
there is no reaction in the canvas.
If I move the mouse heavyly over the canvas back and forth, I see the
reaction of the timer.
It seems, that the repaint of the canvas is only done after a
mouse-event and not after a simple change of an attribute.
How can I force a refresh after the change of the display attribute?
Thanks for help.
Reinhard
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
Re: Refresh JCanvas after changing attribute
Posted by th...@kodak.com.
Hi Reinhard,
Please read the Batik FAQ, in particular:
http://xmlgraphics.apache.org/batik/faqs.html#faq-22
"Reinhard X. Fuerst" <rx...@rexfue.de> wrote on 03/19/2006 12:55:23 PM:
> Hi,
>
> I want some elements in my SVG-grafik to blink.
> I try to do this with switching the display attribute between 'inline'
> an 'none'.
> If i do
'document.getElementById("Sonne").setAttribute("display","none")'
> and
> '....,"inline") in the eventhandler for mouse-actions, it works fine.
>
> But if I do the same calls in the 'actionPerformed' of a swing-timer,
> there is no reaction in the canvas.
> If I move the mouse heavyly over the canvas back and forth, I see the
> reaction of the timer.
>
> It seems, that the repaint of the canvas is only done after a
> mouse-event and not after a simple change of an attribute.
>
> How can I force a refresh after the change of the display attribute?
>
> Thanks for help.
>
> Reinhard
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org