>>>>> "LJ" == Lolling, Jan <[EMAIL PROTECTED]> writes:

LJ> We use this thread because we want get a visual result as soon as
LJ> possible in our canvas.  If you calculate in the DOM without
LJ> needing update canvas, I think you do not need a separate thread.

LJ> We also search elements in DOM (for selection-method) but it is
LJ> not necessary to use a thread for read only acces to DOM. Only
LJ> updating shoud be threaded.

    So we use the update thread to synchronize access to the DOM.  If
you walk the DOM tree in a thread other than the update thread you run
the risk that someone in the update thread will delete the subtree
that you are working on and your traversal will die.

    So both reading and writing should be threaded, but writing needs
to be threaded (for updates to happen in a timely manner).

LJ> Jan

LJ> -----Urspr�ngliche Nachricht----- Von: Harm Cuppens
LJ> [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 6. M�rz 2003
LJ> 11:41 An: 'Batik Users' Betreff: RE: repainting the cavas on
LJ> command


LJ> That did the trick,

LJ> Ok, so a Runnable must be created when updating/creating/deleting
LJ> DOM elements/attributes ?

LJ> I also create a sort of DOM tree, this doesn't alter any of the
LJ> DOM elements or the document's structure, it just searches for
LJ> certain elements etc..., do I have to create this tree inside a
LJ> runnable too or just when physically altering the DOM tree,
LJ> basically can I happily do searches on DOM in another thread (and
LJ> not manipulating the results)?

LJ> Thanks !

LJ> -----Original Message----- From: Lolling, Jan
LJ> [mailto:[EMAIL PROTECTED] Sent: donderdag 6 maart 2003
LJ> 11:13 To: [EMAIL PROTECTED] Subject: AW: repainting the
LJ> cavas on command


LJ> question: do you use the appropriated method for updating the
LJ> SVG-DOM ?

LJ> As an attachment you find my class to create an plolygon in the
LJ> DOM.  This class implements an interactor.

LJ> Jan


LJ> -----Urspr�ngliche Nachricht----- Von: [EMAIL PROTECTED]
LJ> [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 6. M�rz 2003
LJ> 10:59 An: Batik Users Betreff: repainting the cavas on command


LJ> I have a similar repainting problem. And my Canvas is set to
LJ> ALWAYS_DYNAMIC.

LJ> Any suggestions for the repaint on command?

LJ> Ralf "Lolling, Jan" <[EMAIL PROTECTED]> schrieb am
LJ> 06.03.2003, 10:49:41:
>> draw a grid with a polyline e.g.
>> 
>> If you don't need this grid in your DOM than paint the grid in a
>> overlay
LJ> from canvas.
>>  Jan
>> 
>> -----Urspr�ngliche Nachricht----- Von: Siarhei Biarozkin
>> [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 6. M�rz 2003
>> 10:43 An: Batik Users; [EMAIL PROTECTED] Betreff: Re:
>> repainting the cavas on command
>> 
>> 
>> Hi, We had a similar problem, you need to call
LJ> setDocumentState(ALWAYS_DYNAMIC).
>> Be aware though, that if you editor runs in a secure environment,
>> then the above call will cause a security exception be thrown (in
>> our case it translates to "unknown ecmascript element" or smth like
>> that), so you'll need then to sign your application as
>> well. Additionally, your svg
LJ> document
>> manipulation should be done on an update/event thread (to prevent
>> synchronization issues), we do it with SwingUtilities.invokeLater,
LJ> perhaps,
>> there's a better way to do it in Batik ?
>> 
>> By the way, right now we'll need a grid (where a grid cell
>> vertical/horizontal size can be dynamically updated by a user)
>> drawn in
LJ> SVG
>> as well. With a native Java drawing, we use a 2x2 black rect to
>> draw a
LJ> grid
>> point, with a 1280/1024 view area it takes 64 * 51 rects with a
>> grid cell x&y equals to 20.  How do you draw the grid in SVG ?
>> 
>> Cheers Siarhei Biarozkin ----- Original Message ----- From: "Harm
>> Cuppens" To: "Batik Users (E-mail)" Sent: Thursday, March 06, 2003
>> 8:57 AM Subject: repainting the cavas on command
>> 
>> 
>> > Hello all,
>> >
>> > I have the following problem. I'm creating a little SVG editor
>> and I
LJ> have
>> a > seperate toolbar for the drawing tools etc.  > In my
>> application I can create a grid (a group with line elements) that
>> has > to be embedded inside the svg document.  > The user has the
>> abillity to toggle this grid on and off (which simply sets > the
>> visible attribute of the gridgroup).  > Now my problem, whenever I
>> press the toggle button to turn on my grid
LJ> (or
>> > off), the canvas won't immediately update the changes made to the
>> DOM.
LJ> It
>> > does nothing untill I move my mouse pointer over the canvas, then
>> the > repainting kicks in (immediately). I've tried calling
>> repaint, > immediateRepaint on the JSVGCanvas but that didn't
>> help. I've also tried the > repaint method on the UpdateManager
>> class, but this caused an exception.
>> >
>> > I'm pretty new to Java, so I'm not sure if this because the
>> painting > mechanics of Java (that the component must have focus
>> for repaint to work), > or if this is something related to batik
>> itself.  > Or am I calling the wrong methods to repaint the canvas
>> ?
>> >
>> > Any input appreciated.  > Thanks,
>> >
>> > Harm
>> >
>> >
>> > ---------------------------------------------------------------------
>> > 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]
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED] For
>> additional commands, e-mail: [EMAIL PROTECTED]

LJ> ---------------------------------------------------------------------
LJ> To unsubscribe, e-mail: [EMAIL PROTECTED] For
LJ> additional commands, e-mail: [EMAIL PROTECTED]




LJ> ---------------------------------------------------------------------
LJ> To unsubscribe, e-mail: [EMAIL PROTECTED] For
LJ> additional commands, e-mail: [EMAIL PROTECTED]

LJ> ---------------------------------------------------------------------
LJ> To unsubscribe, e-mail: [EMAIL PROTECTED] For
LJ> additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to