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 ma...@geomagic.de on 2003/03/20 14:02:14 UTC

Re:: Dynamic DOM updates

I experienced the updateQueue "bug" to. I think it occurs for me if i
set an svg Document and try to add elements to it in a second Runable
before the initianal Rendering of the Document is completet

Thomas E Deweese <th...@kodak.com> schrieb am 20.03.2003,
13:31:11:
> >>>>> "CE" == Christian Enklaar  writes:
> 
> CE> I have got some problems with the dynamic update too ...
> 
> CE> some general points are that you have to set
> CE> svgCanvas.setDocumentState(JSVGComponent.ALWAYS_DYNAMIC);
> 
> CE> and you have to use the updateQueue to get the dynamic updates to
> CE> be performed
> 
>     Correct!
> 
> CE> My problem is that there "sometimes" is no updateManager for my
> CE> JSVGCanvas allthough the document is set) and that "sometimes" the
> CE> updateRunnableQueue is not running when I call invokeLater.  
> 
>     Well this sounds like it would be classified as a bug.  Can you
> provide a nice small standalone example that shows this?
> 
> CE> Can I perform several changes in one call of invokeLater or do I
> CE> have to call it seperately for every single attribute change
> CE> (etc.) ?  
> 
>     You can (and should) batch changes as much as possible (of course
> be aware that while your runnable is executing updates to the screen
> can't happen - which can be to your advantage in some cases).
> 
> CE> Is there a good working example for using the updateRunnableQueue
> CE> - I don't mean one where the whole document changes but where only
> CE> some fragments change (like the visibility for example) ?
> 
>     Sorry, I don't know of any examples other than Batik it's self or
> stuff sent to this mail-list.  If someone wanted to write an
> updateRunnableQueue primer I'm sure we would be happy to add it to the
> Batik documentation.
> 
> CE> Greetings, Christian.
> 
> >> -----Ursprüngliche Nachricht----- Von: josh
> >> [mailto:joshw@speakeasy.net] Gesendet: Donnerstag, 20. März 2003
> >> 06:41 An: batik-users@xml.apache.org 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: batik-users-unsubscribe@xml.apache.org For
> >> additional commands, e-mail: batik-users-help@xml.apache.org
> >> 
> 
> CE> ---------------------------------------------------------------------
> CE> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
> CE> additional commands, e-mail: batik-users-help@xml.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


RE: Re:: Dynamic DOM updates

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "magic" == magic  <ma...@geomagic.de> writes:

magic> I experienced the updateQueue "bug" to. I think it occurs for
magic> me if i set an svg Document and try to add elements to it in a
magic> second Runable before the initianal Rendering of the Document
magic> is completet

       Ahh, yes! Thanks!

       The update manager is not started until the first rendering
completes.  So a Java application needs to register and wait for a
managerStarted event before it can start dispatching things into the
updateQueue.

magic> Thomas E Deweese <th...@kodak.com> schrieb am
magic> 20.03.2003, 13:31:11:
>> >>>>> "CE" == Christian Enklaar writes:
>> 
CE> I have got some problems with the dynamic update too ...
>>
CE> some general points are that you have to set
CE> svgCanvas.setDocumentState(JSVGComponent.ALWAYS_DYNAMIC);
>>
CE> and you have to use the updateQueue to get the dynamic updates to
CE> be performed
>>  Correct!
>> 
CE> My problem is that there "sometimes" is no updateManager for my
CE> JSVGCanvas allthough the document is set) and that "sometimes" the
CE> updateRunnableQueue is not running when I call invokeLater.
>>  Well this sounds like it would be classified as a bug.  Can you
>> provide a nice small standalone example that shows this?
>> 
CE> Can I perform several changes in one call of invokeLater or do I
CE> have to call it seperately for every single attribute change
CE> (etc.) ?
>>  You can (and should) batch changes as much as possible (of course
>> be aware that while your runnable is executing updates to the
>> screen can't happen - which can be to your advantage in some
>> cases).
>> 
CE> Is there a good working example for using the updateRunnableQueue
CE> - I don't mean one where the whole document changes but where only
CE> some fragments change (like the visibility for example) ?
>>  Sorry, I don't know of any examples other than Batik it's self or
>> stuff sent to this mail-list.  If someone wanted to write an
>> updateRunnableQueue primer I'm sure we would be happy to add it to
>> the Batik documentation.
>> 
CE> Greetings, Christian.
>>  >> -----Ursprüngliche Nachricht----- Von: josh >>
>> [mailto:joshw@speakeasy.net] Gesendet: Donnerstag, 20. März 2003 >>
>> 06:41 An: batik-users@xml.apache.org 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: batik-users-unsubscribe@xml.apache.org
>> For >> additional commands, e-mail: batik-users-help@xml.apache.org
>> >> 
>> 
CE> ---------------------------------------------------------------------
CE> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
CE> additional commands, e-mail: batik-users-help@xml.apache.org
>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
>> additional commands, e-mail: batik-users-help@xml.apache.org

magic> ---------------------------------------------------------------------
magic> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
magic> For additional commands, e-mail:
magic> batik-users-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


RE: dynamic cache ideas

Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "FG" == Felipe Gaúcho <ga...@atlantico.com.br> writes:

FG> I´m trying to implement a kind of "dynamic cache" to treat monster
FG> SVG files representing GML objects.

FG> The problem: I have a million objects GML file, and I needto
FG> convert it to a SVG file.

FG> The guess: Include in the SVG file some kind of "quadrant"
FG> information, providing an easy way to detect when to load a set of
FG> objetcs. Each of theese quadrants are part of a separate svg,
FG> which is select depending of the current drwaing coordinates ...

FG> any other tip? SVG has some similar functionality ?

    Currently SVG does not have native support for this.  You may be
able to fake some of it with script (get screenCTM, getViewport, etc).  

    However, Batik has an extension element that probably does exactly
what you want.  It is the 'multiImage' element, you can see an example
in samples/extensions/multi.svg and samples/extensions/multi2.svg
(multi2.svg is closer to what you want I think).

    Remember that this is _NOT_SVG_ if you use this your content will
be non-conformant svg and other viewers will ignore these elements.
There is some chance that something like this might one day be part of
SVG but right now you will be off in your own little world if you use
this.



---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


dynamic cache ideas

Posted by Felipe Gaúcho <ga...@atlantico.com.br>.
Dear friends,

I´m trying to implement a kind of "dynamic cache" to treat monster SVG files
representing GML objects.

The problem: I have a million objects GML file, and I needto convert it to a
SVG file.

The guess: Include in the SVG file some kind of "quadrant" information,
providing an easy way to detect when to load a set of objetcs. Each of
theese quadrants are part of a separate svg, which is select depending of
the current drwaing coordinates ...

any other tip? SVG has some similar functionality ?

best regrads,

	Felipe Gaúcho


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org