From batikdtorres@example.com Tue Sep 02 06:19:35 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 80865 invoked from network); 2 Sep 2003 06:19:35 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Sep 2003 06:19:35 -0000 Received: (qmail 17829 invoked by uid 500); 2 Sep 2003 06:18:47 -0000 Delivered-To: dtorres@example.com Received: (qmail 17633 invoked by uid 500); 2 Sep 2003 06:18:45 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 17519 invoked from network); 2 Sep 2003 06:18:43 -0000 Message-ID: <dtorres@example.com> Date: Tue, 02 Sep 2003 08:18:22 +0200 From: Marcel Ruff <dtorres@example.com> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dtorres@example.com Subject: SVGOMUseElement.getInstanceRoot() ? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Seen: false X-ID: dtorres@example.com X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, the SVGOMUseElement.getInstanceRoot() returns " !!! TODO: getInstanceRoot()" Is there any development under way to implement getInstanceRoot() to support scripting of the <use> tag? thanks, Marcel -- http://www.xmlBlaster.org --------------------------------------------------------------------- To unsubscribe, e-mail: dtorres@example.com For additional commands, e-mail: dtorres@example.com From batikdtorres@example.com Tue Sep 02 11:56:29 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 67128 invoked from network); 2 Sep 2003 11:56:29 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Sep 2003 11:56:29 -0000 Received: (qmail 22754 invoked by uid 500); 2 Sep 2003 11:56:26 -0000 Delivered-To: dtorres@example.com Received: (qmail 22733 invoked by uid 500); 2 Sep 2003 11:56:25 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 22712 invoked from network); 2 Sep 2003 11:56:24 -0000 Message-ID: <dtorres@example.com> Date: Tue, 02 Sep 2003 07:52:30 -0400 From: Thomas DeWeese <dtorres@example.com> Organization: Eastman Kodak Company User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dtorres@example.com Subject: Re: SVGOMUseElement.getInstanceRoot() ? References: <dtorres@example.com> In-Reply-To: <dtorres@example.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Marcel Ruff wrote: > Hi, > > the SVGOMUseElement.getInstanceRoot() returns > > " !!! TODO: getInstanceRoot()" > > Is there any development under way to implement > getInstanceRoot() to support scripting of > the <use> tag? Hi Mercel, There is currently no development under way to implement this. The initial implementation of use was wrong with regards to the spec and fixing this is non-trivial (and the need is usually not obvious). I have given thought to how it may be implemented properly but don't expect it to be fixed by the Batik committers soon. Contributions are always welcome. --------------------------------------------------------------------- To unsubscribe, e-mail: dtorres@example.com For additional commands, e-mail: dtorres@example.com From batikdtorres@example.com Tue Sep 02 14:17:16 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 42860 invoked from network); 2 Sep 2003 14:17:15 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Sep 2003 14:17:15 -0000 Received: (qmail 11366 invoked by uid 500); 2 Sep 2003 14:17:09 -0000 Delivered-To: dtorres@example.com Received: (qmail 11353 invoked by uid 500); 2 Sep 2003 14:17:09 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 11328 invoked from network); 2 Sep 2003 14:17:08 -0000 Message-ID: <dtorres@example.com> From: "Paul Sinnema" <dtorres@example.com> To: <dtorres@example.com> Subject: Finding an Element (Node) in the DOM with an X Y coordinate from a MouseEvent Date: Tue, 2 Sep 2003 15:21:42 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0223_01C37165.E9ECED40" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0223_01C37165.E9ECED40 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I've been struggling with several issues using Batik as the main display = for an new UML Class Diagram in Eclipse. I've solved several of the = issues, but I'm kinda stuck right now. In my 'view' I use an Interactor to get actions from the mouse (click, = press, etc...). I would like to be able to drag a <g> from one place to = another (make it topped, resize, etc....) for that I need to know which = element in the DOM tree was clicked, dragged, etc.... Has anyone got any experience with this? Paul. ------=_NextPart_000_0223_01C37165.E9ECED40 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2> <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>I've been struggling with several = issues using=20 Batik as the main display for an new UML Class Diagram in Eclipse. I've = solved=20 several of the issues, but I'm kinda stuck right now.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>In my 'view' I use an Interactor to get = actions=20 from the mouse (click, press, etc...). I would like to be able to drag a = &lt;g&gt; from one place to another (make it topped, resize, etc....) = for that I=20 need to know which element in the DOM tree was clicked, dragged,=20 etc....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Has anyone got any experience with=20 this?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial = size=3D2>Paul.</FONT></DIV></FONT></DIV></BODY></HTML> ------=_NextPart_000_0223_01C37165.E9ECED40-- From batikdtorres@example.com Tue Sep 02 14:32:50 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 51085 invoked from network); 2 Sep 2003 14:32:50 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Sep 2003 14:32:50 -0000 Received: (qmail 50751 invoked by uid 500); 2 Sep 2003 14:32:24 -0000 Delivered-To: dtorres@example.com Received: (qmail 50723 invoked by uid 500); 2 Sep 2003 14:32:24 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 50676 invoked from network); 2 Sep 2003 14:32:23 -0000 Message-ID: <dtorres@example.com> Date: Tue, 02 Sep 2003 10:32:10 -0400 From: Thomas DeWeese <dtorres@example.com> Organization: Eastman Kodak Company User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dtorres@example.com Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinate from a MouseEvent References: <dtorres@example.com> In-Reply-To: <dtorres@example.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Paul Sinnema wrote: > Hi, > > I've been struggling with several issues using Batik as the main display for an new UML Class Diagram in Eclipse. I've solved several of the issues, but I'm kinda stuck right now. > > In my 'view' I use an Interactor to get actions from the mouse (click, press, etc...). I would like to be able to drag a <g> from one place to another (make it topped, resize, etc....) for that I need to know which element in the DOM tree was clicked, dragged, etc.... > > Has anyone got any experience with this? I would suggest registering mouse event listeners in the DOM. We already propogate UI events to the corresponding DOM element for you. --------------------------------------------------------------------- To unsubscribe, e-mail: dtorres@example.com For additional commands, e-mail: dtorres@example.com From batikdtorres@example.com Tue Sep 02 18:17:42 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 52792 invoked from network); 2 Sep 2003 18:17:42 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Sep 2003 18:17:42 -0000 Received: (qmail 13370 invoked by uid 500); 2 Sep 2003 18:17:29 -0000 Delivered-To: dtorres@example.com Received: (qmail 13324 invoked by uid 500); 2 Sep 2003 18:17:28 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 13283 invoked from network); 2 Sep 2003 18:17:28 -0000 Message-ID: <dtorres@example.com> From: "Paul Sinnema" <dtorres@example.com> To: <dtorres@example.com> Subject: Finding an Element (Node) in the DOM with an X Y coordinate from a MouseEvent Date: Tue, 2 Sep 2003 15:21:27 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0219_01C37165.E1067C00" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0219_01C37165.E1067C00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I've been struggling with several issues using Batik as the main display = for an new UML Class Diagram in Eclipse. I've solved several of the = issues, but I'm kinda stuck right now. In my 'view' I use an Interactor to get actions from the mouse (click, = press, etc...). I would like to be able to drag a <g> from one place to = another (make it topped, resize, etc....) for that I need to know which = element in the DOM tree was clicked, dragged, etc.... Has anyone got any experience with this? Paul. ------=_NextPart_000_0219_01C37165.E1067C00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2> <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>I've been struggling with several = issues using=20 Batik as the main display for an new UML Class Diagram in Eclipse. I've = solved=20 several of the issues, but I'm kinda stuck right now.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>In my 'view' I use an Interactor to get = actions=20 from the mouse (click, press, etc...). I would like to be able to drag a = &lt;g&gt; from one place to another (make it topped, resize, etc....) = for that I=20 need to know which element in the DOM tree was clicked, dragged,=20 etc....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Has anyone got any experience with=20 this?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial = size=3D2>Paul.</FONT></DIV></FONT></DIV></BODY></HTML> ------=_NextPart_000_0219_01C37165.E1067C00-- From batikdtorres@example.com Tue Sep 02 20:19:19 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 9928 invoked from network); 2 Sep 2003 20:19:19 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 2 Sep 2003 20:19:19 -0000 Received: (qmail 74370 invoked by uid 500); 2 Sep 2003 20:17:44 -0000 Delivered-To: dtorres@example.com Received: (qmail 74323 invoked by uid 500); 2 Sep 2003 20:17:44 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 74045 invoked from network); 2 Sep 2003 20:17:40 -0000 Message-ID: <dtorres@example.com> From: "Paul Sinnema" <dtorres@example.com> To: <dtorres@example.com> Subject: Finding an Element (Node) in the DOM with an X Y coordinate from a MouseEvent Date: Tue, 2 Sep 2003 14:50:47 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_01C9_01C37161.9873ACF0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPart_000_01C9_01C37161.9873ACF0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I've been struggling with several issues using Batik as the main display = for an new UML Class Diagram in Eclipse. I've solved several of the = issues, but I'm kinda stuck right now. In my 'view' I use an Interactor to get actions from the mouse (click, = press, etc...). I would like to be able to drag a <g> from one place to = another (make it topped, resize, etc....) for that I need to know which = element in the DOM tree was clicked, dragged, etc.... Has anyone got any experience with this? Paul. ------=_NextPart_000_01C9_01C37161.9873ACF0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>I've been struggling with several = issues using=20 Batik as the main display for an new UML Class Diagram in Eclipse. I've = solved=20 several of the issues, but I'm kinda stuck right now.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>In my 'view' I use an Interactor to get = actions=20 from the mouse (click, press, etc...). I would like to be able to drag a = &lt;g&gt; from one place to another (make it topped, resize, etc....) = for that I=20 need to know which element in the DOM tree was clicked, dragged,=20 etc....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Has anyone got any experience with=20 this?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Paul.</FONT></DIV></BODY></HTML> ------=_NextPart_000_01C9_01C37161.9873ACF0-- From batikdtorres@example.com Wed Sep 03 07:11:03 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 80518 invoked from network); 3 Sep 2003 07:11:03 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Sep 2003 07:11:03 -0000 Received: (qmail 42185 invoked by uid 500); 3 Sep 2003 07:10:28 -0000 Delivered-To: dtorres@example.com Received: (qmail 41923 invoked by uid 500); 3 Sep 2003 07:10:23 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 41752 invoked from network); 3 Sep 2003 07:10:20 -0000 Message-ID: <dtorres@example.com> From: "Paul Sinnema" <dtorres@example.com> To: <dtorres@example.com> References: <dtorres@example.com> Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinate from a MouseEvent Date: Wed, 3 Sep 2003 09:05:48 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0012_01C371FA.90E53910" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0012_01C371FA.90E53910 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, Yesterday I received an answer to my problem in the following sense = (received it at home and am now at the office, so don't have the mail = over here): I should add a listener to the DOM. The events were already = propagated(?) Good to hear there's a solution to this, but how? Paul. ----- Original Message -----=20 From: Paul Sinnema=20 To: dtorres@example.com=20 Sent: Tuesday, September 02, 2003 2:50 PM Subject: Finding an Element (Node) in the DOM with an X Y coordinate = from a MouseEvent Hi, I've been struggling with several issues using Batik as the main = display for an new UML Class Diagram in Eclipse. I've solved several of = the issues, but I'm kinda stuck right now. In my 'view' I use an Interactor to get actions from the mouse (click, = press, etc...). I would like to be able to drag a <g> from one place to = another (make it topped, resize, etc....) for that I need to know which = element in the DOM tree was clicked, dragged, etc.... Has anyone got any experience with this? Paul. ------=_NextPart_000_0012_01C371FA.90E53910 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2800.1226" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Yesterday I received an answer to my = problem in the=20 following sense (received it at home and am now at the office, so don't = have the=20 mail over here): I should add a listener to the DOM. The events were = already=20 propagated(?) Good to hear there's a solution to this, but = how?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Paul.</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A dtorres@example.com = href=3D"mailto:dtorres@example.com">Paul=20 Sinnema</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = dtorres@example.com=20 href=3D"mailto:dtorres@example.com">dtorres@example.com</A> = </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, September 02, = 2003 2:50=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Finding an Element = (Node) in the=20 DOM with an X Y coordinate from a MouseEvent</DIV> <DIV><BR></DIV> <DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>I've been struggling with several = issues using=20 Batik as the main display for an new UML Class Diagram in Eclipse. = I've solved=20 several of the issues, but I'm kinda stuck right now.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>In my 'view' I use an Interactor to = get actions=20 from the mouse (click, press, etc...). I would like to be able to drag = a=20 &lt;g&gt; from one place to another (make it topped, resize, etc....) = for that=20 I need to know which element in the DOM tree was clicked, dragged,=20 etc....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial size=3D2>Has anyone got any experience with=20 this?</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV> <DIV><FONT face=3DArial = size=3D2>Paul.</FONT></DIV></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0012_01C371FA.90E53910-- From batikdtorres@example.com Wed Sep 03 07:54:29 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 97446 invoked from network); 3 Sep 2003 07:54:29 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Sep 2003 07:54:29 -0000 Received: (qmail 32114 invoked by uid 500); 3 Sep 2003 07:52:25 -0000 Delivered-To: dtorres@example.com Received: (qmail 32076 invoked by uid 500); 3 Sep 2003 07:52:24 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 31888 invoked from network); 3 Sep 2003 07:52:20 -0000 Message-ID: <dtorres@example.com> From: "Paul Sinnema" <dtorres@example.com> To: <dtorres@example.com> References: <dtorres@example.com> <1062574089.2296.23.camel@popgi01> Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinatefrom a MouseEvent Date: Wed, 3 Sep 2003 09:47:55 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Philippe, I'm currently building an Eclipse 'View' (yes it's the Open Source Project you are referring to) to display and manipulate SVG. The intent is to build an UML Class Diagram which in turn will create an XML that can be transformed to an XMI with EMF in Eclipse. From there we are able to generate code for several applications (JAVA, DOTNet, C++....). All the code, for the view, is created by me (with a little help of Eclipse and of course I've looked at other applications and copied where possible). Paul. ----- Original Message ----- From: "Philippe GIL" <dtorres@example.com> To: "Paul Sinnema" <dtorres@example.com> Sent: Wednesday, September 03, 2003 9:28 AM Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinatefrom a MouseEvent Bonjour Paul, I have some questions regarding your mail. Does Eclipse mean the IBM open source project? (http://www.eclipse.org/) Are you displaying SVG files inside Eclipse plugins (views or editors)? What plugin are you using to display the SVG content, Java Advanced Imaging over holongate Batik support (http://www.holongate.org/), Dirk Lemmerman's Batik SVG Viewer (http://www.eclipse-workbench.com/jsp/plugin_detail.jsp?id=139&cat=27) or another way? The project I'm working on, need to edit SVG file under Eclipse run-time. Amicalement Philippe Le mar 02/09/2003 à 15:21, Paul Sinnema a écrit : > Hi, > > I've been struggling with several issues using Batik as the main display for an new UML Class Diagram in Eclipse. I've solved several of the issues, but I'm kinda stuck right now. > > In my 'view' I use an Interactor to get actions from the mouse (click, press, etc...). I would like to be able to drag a <g> from one place to another (make it topped, resize, etc....) for that I need to know which element in the DOM tree was clicked, dragged, etc.... > > Has anyone got any experience with this? > > Paul. --------------------------------------------------------------------- To unsubscribe, e-mail: dtorres@example.com For additional commands, e-mail: dtorres@example.com From batikdtorres@example.com Wed Sep 03 10:02:09 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 67930 invoked from network); 3 Sep 2003 10:02:09 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Sep 2003 10:02:09 -0000 Received: (qmail 76460 invoked by uid 500); 3 Sep 2003 10:01:39 -0000 Delivered-To: dtorres@example.com Received: (qmail 76443 invoked by uid 500); 3 Sep 2003 10:01:38 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 76403 invoked from network); 3 Sep 2003 10:01:38 -0000 Message-ID: <dtorres@example.com> Date: Wed, 03 Sep 2003 06:01:42 -0400 From: Thomas DeWeese <dtorres@example.com> Organization: Eastman Kodak Company User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dtorres@example.com Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinate from a MouseEvent References: <dtorres@example.com> <dtorres@example.com> In-Reply-To: <dtorres@example.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Paul, Paul Sinnema wrote: > Yesterday I received an answer to my problem in the following sense > (received it at home and am now at the office, so don't have the mail > over here): I should add a listener to the DOM. The events were already > propagated(?) Good to hear there's a solution to this, but how? Read: http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/ Or search the Batik source for addEventListener. > > Paul. > ----- Original Message ----- > From: Paul Sinnema > To: dtorres@example.com > Sent: Tuesday, September 02, 2003 2:50 PM > Subject: Finding an Element (Node) in the DOM with an X Y coordinate from a MouseEvent > > > Hi, > > I've been struggling with several issues using Batik as the main display for an new UML Class Diagram in Eclipse. I've solved several of the issues, but I'm kinda stuck right now. > > In my 'view' I use an Interactor to get actions from the mouse (click, press, etc...). I would like to be able to drag a <g> from one place to another (make it topped, resize, etc....) for that I need to know which element in the DOM tree was clicked, dragged, etc.... > > Has anyone got any experience with this? > > Paul. > --------------------------------------------------------------------- To unsubscribe, e-mail: dtorres@example.com For additional commands, e-mail: dtorres@example.com From batikdtorres@example.com Wed Sep 03 10:19:08 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 76786 invoked from network); 3 Sep 2003 10:19:08 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Sep 2003 10:19:08 -0000 Received: (qmail 11531 invoked by uid 500); 3 Sep 2003 10:18:50 -0000 Delivered-To: dtorres@example.com Received: (qmail 11502 invoked by uid 500); 3 Sep 2003 10:18:49 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 11472 invoked from network); 3 Sep 2003 10:18:49 -0000 Message-ID: <dtorres@example.com> From: "Paul Sinnema" <dtorres@example.com> To: <dtorres@example.com> References: <dtorres@example.com><1062574089.2296.23.camel@popgi01> <dtorres@example.com> <1062578238.2296.33.camel@popgi01> Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinatefroma MouseEvent Date: Wed, 3 Sep 2003 11:19:16 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Philippe, All the SVG handling is done by batik. I've inserted the JSVGCanvas in the view (still have a flicker problem = during drawing, I think it's because the JSVGCanvas is added to an SWT = panel which is also redrawn). Since this morning I've got the following code working. If this is the = correct way to do things, I then need to know how to get the DOM Node or = Element from the Event! private static final String MOUSE_CLICK=3D "click"; private static final String MOUSE_MOVE=3D "mousemove"; private static final String MOUSE_DOWN=3D "mousedown"; private static final String MOUSE_UP=3D "mouseup"; private void handleMyEvent(Event event) { EventTarget et=3D event.getTarget(); setTitleText( " Type =3D " + event.getType() + " Phase =3D " + event.getEventPhase() + " Current target =3D " + et.getClass() + " Timestamp =3D " + event.getTimeStamp()); } public void createPartControl(final Composite parent) { try { svgCanvas=3D new JSVGCanvas(new MyUserAgent(), true, true); svgCanvas.setDoubleBuffered(true); svgCanvas.setDoubleBufferedRendering(true); svgCanvas.addSVGLoadEventDispatcherListener(new = SVGLoadEventDispatcherListener() { public void svgLoadEventDispatchStarted(SVGLoadEventDispatcherEvent = arg0) { // setTitleText("svgLoadEventDispatchStarted"); } public void = svgLoadEventDispatchCompleted(SVGLoadEventDispatcherEvent arg0) { SVGSVGElement root=3D svgCanvas.getSVGDocument().getRootElement(); root.addEventListener(MOUSE_CLICK, new EventListener() { public void handleEvent(Event arg0) { handleMyEvent(arg0); } }, true); root.addEventListener(MOUSE_MOVE, new EventListener() { public void handleEvent(Event arg0) { handleMyEvent(arg0); } }, true); root.addEventListener(MOUSE_DOWN, new EventListener() { public void handleEvent(Event arg0) { handleMyEvent(arg0); } }, true); root.addEventListener(MOUSE_UP, new EventListener() { public void handleEvent(Event arg0) { handleMyEvent(arg0); } }, true); } public void = svgLoadEventDispatchCancelled(SVGLoadEventDispatcherEvent arg0) { // setTitleText("svgLoadEventDispatchCancelled"); } public void svgLoadEventDispatchFailed(SVGLoadEventDispatcherEvent = arg0) { // setTitleText("svgLoadEventDispatchFailed"); } }); awtPanel=3D SWT_AWT.new_Panel(parent); awtPanel.setLayout(new BorderLayout()); awtPanel.add("Center", svgCanvas); shell=3D getViewSite().getShell(); createActions(); } catch (Throwable t) { t.printStackTrace(); } getViewSite().getPage().addSelectionListener(this); } Paul. ----- Original Message -----=20 From: "Philippe GIL" <dtorres@example.com> To: "Paul Sinnema" <dtorres@example.com> Sent: Wednesday, September 03, 2003 10:37 AM Subject: Re: Finding an Element (Node) in the DOM with an X Y = coordinatefroma MouseEvent > Bonjour Paul, >=20 > I can't still figure how you use batik under eclipse? >=20 > What part of the SVG handling is managed by batik? > How do you display SVG content inside your view? Do you parse the = batik > GVT making your own GVT to screen bridge? Do you generate a bitmap = with > batik to display it later in your view. Do you insert an JSVGCanvas in > your view? > The solution of your problem will probably depend on it. >=20 > Amicalement > Philippe Le mer 03/09/2003 =E0 09:47, Paul Sinnema a =E9crit : > Philippe, >=20 > I'm currently building an Eclipse 'View' (yes it's the Open Source = Project > you are referring to) to display and manipulate SVG. The intent is to = build > an UML Class Diagram which in turn will create an XML that can be > transformed to an XMI with EMF in Eclipse. From there we are able to > generate code for several applications (JAVA, DOTNet, C++....). All = the > code, for the view, is created by me (with a little help of Eclipse = and of > course I've looked at other applications and copied where possible). >=20 > Paul. >=20 > ----- Original Message -----=20 > From: "Philippe GIL" <dtorres@example.com> > To: "Paul Sinnema" <dtorres@example.com> > Sent: Wednesday, September 03, 2003 9:28 AM > Subject: Re: Finding an Element (Node) in the DOM with an X Y = coordinatefrom > a MouseEvent >=20 >=20 > Bonjour Paul, >=20 > I have some questions regarding your mail. >=20 > Does Eclipse mean the IBM open source project? = (http://www.eclipse.org/) > Are you displaying SVG files inside Eclipse plugins (views or = editors)? > What plugin are you using to display the SVG content, Java Advanced > Imaging over holongate Batik support (http://www.holongate.org/), Dirk > Lemmerman's Batik SVG Viewer > = (http://www.eclipse-workbench.com/jsp/plugin_detail.jsp?id=3D139&cat=3D27= ) > or another way? >=20 > The project I'm working on, need to edit SVG file under Eclipse > run-time. >=20 > Amicalement > Philippe >=20 >=20 > Le mar 02/09/2003 =E0 15:21, Paul Sinnema a =E9crit : > > Hi, > > > > I've been struggling with several issues using Batik as the main = display > for an new UML Class Diagram in Eclipse. I've solved several of the = issues, > but I'm kinda stuck right now. > > > > In my 'view' I use an Interactor to get actions from the mouse = (click, > press, etc...). I would like to be able to drag a <g> from one place = to > another (make it topped, resize, etc....) for that I need to know = which > element in the DOM tree was clicked, dragged, etc.... > > > > Has anyone got any experience with this? > > > > Paul. >=20 >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: dtorres@example.com > For additional commands, e-mail: dtorres@example.com >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: dtorres@example.com For additional commands, e-mail: dtorres@example.com From batikdtorres@example.com Wed Sep 03 12:37:13 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 46505 invoked from network); 3 Sep 2003 12:37:13 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Sep 2003 12:37:13 -0000 Received: (qmail 13045 invoked by uid 500); 3 Sep 2003 12:37:05 -0000 Delivered-To: dtorres@example.com Received: (qmail 13001 invoked by uid 500); 3 Sep 2003 12:37:03 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 12954 invoked from network); 3 Sep 2003 12:37:02 -0000 Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinatefroma MouseEvent From: Philippe GIL <dtorres@example.com> To: dtorres@example.com In-Reply-To: <dtorres@example.com> References: <dtorres@example.com><1062574089.2296.23.camel@popgi01> <dtorres@example.com> <1062578238.2296.33.camel@popgi01> <dtorres@example.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable X-Mailer: Ximian Evolution 1.0.8-3mdk Date: 03 Sep 2003 14:36:46 +0200 Message-Id: <1062592606.2296.103.camel@popgi01> Mime-Version: 1.0 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Bonjour Paul, Thanks for your code. You are using SWT_AWT class. Does it still experimental and only for win32? That's working code when the JSVGCanvas is added to a JPanel; addEventListener is called for each svg element you need to get inputs getCurrentTarget returns the "clicked" Element. This code is thead-safe in case your mouse action need to update the DOM. EventListener onClick =3D new OnClickAction(); EventTarget t; =20 t =3D (EventTarget)(svgCanvas.getSVGDocument(). getElementById(svgid)); =20 // Adds a 'onclick' listener t.addEventListener("click", onClick, false); public class OnClickAction implements EventListener, Runnable { Event evt; public void handleEvent(Event evt) { this.evt =3D evt; if (Thread.currentThread() =3D=3D svgCanvas.getUpdateManager(). getUpdateRunnableQueue().getThread()){ Element elt; =20 elt =3D (Element)(evt.getCurrentTarget()); if (elt !=3D null) { String svgid =3D elt.getAttribute("id"); //etc... } } =20 else { try { svgCanvas.getUpdateManager(). getUpdateRunnableQueue().invokeLater (this); } catch (Exception e) { e.printStackTrace(); } } } public void run() { handleEvent(evt); } =20 Amicalement philippe Le mer 03/09/2003 =E0 11:19, Paul Sinnema a =E9crit : > Philippe, >=20 > All the SVG handling is done by batik. > I've inserted the JSVGCanvas in the view (still have a flicker problem du= ring drawing, I think it's because the JSVGCanvas is added to an SWT panel = which is also redrawn). >=20 > Since this morning I've got the following code working. If this is the co= rrect way to do things, I then need to know how to get the DOM Node or Elem= ent from the Event! >=20 > private static final String MOUSE_CLICK=3D "click"; > private static final String MOUSE_MOVE=3D "mousemove"; > private static final String MOUSE_DOWN=3D "mousedown"; > private static final String MOUSE_UP=3D "mouseup"; >=20 > private void handleMyEvent(Event event) > { > EventTarget et=3D event.getTarget(); >=20 > setTitleText( > " Type =3D " > + event.getType() > + " Phase =3D " > + event.getEventPhase() > + " Current target =3D " > + et.getClass() > + " Timestamp =3D " > + event.getTimeStamp()); > } >=20 > public void createPartControl(final Composite parent) > { > try > { > svgCanvas=3D new JSVGCanvas(new MyUserAgent(), true, true); > svgCanvas.setDoubleBuffered(true); > svgCanvas.setDoubleBufferedRendering(true); > svgCanvas.addSVGLoadEventDispatcherListener(new SVGLoadEventDispatcher= Listener() > { >=20 > public void svgLoadEventDispatchStarted(SVGLoadEventDispatcherEvent a= rg0) > { > // setTitleText("svgLoadEventDispatchStarted"); > } >=20 > public void svgLoadEventDispatchCompleted(SVGLoadEventDispatcherEvent= arg0) > { > SVGSVGElement root=3D svgCanvas.getSVGDocument().getRootElement(); > root.addEventListener(MOUSE_CLICK, new EventListener() > { > public void handleEvent(Event arg0) > { > handleMyEvent(arg0); > } > }, true); > root.addEventListener(MOUSE_MOVE, new EventListener() > { > public void handleEvent(Event arg0) > { > handleMyEvent(arg0); > } > }, true); > root.addEventListener(MOUSE_DOWN, new EventListener() > { > public void handleEvent(Event arg0) > { > handleMyEvent(arg0); > } > }, true); > root.addEventListener(MOUSE_UP, new EventListener() > { > public void handleEvent(Event arg0) > { > handleMyEvent(arg0); > } > }, true); > } >=20 > public void svgLoadEventDispatchCancelled(SVGLoadEventDispatcherEvent= arg0) > { > // setTitleText("svgLoadEventDispatchCancelled"); > } >=20 > public void svgLoadEventDispatchFailed(SVGLoadEventDispatcherEvent ar= g0) > { > // setTitleText("svgLoadEventDispatchFailed"); > } > }); > awtPanel=3D SWT_AWT.new_Panel(parent); > awtPanel.setLayout(new BorderLayout()); > awtPanel.add("Center", svgCanvas); > shell=3D getViewSite().getShell(); >=20 > createActions(); > } catch (Throwable t) > { > t.printStackTrace(); > } >=20 > getViewSite().getPage().addSelectionListener(this); > } >=20 > Paul. >=20 > ----- Original Message -----=20 > From: "Philippe GIL" <dtorres@example.com> > To: "Paul Sinnema" <dtorres@example.com> > Sent: Wednesday, September 03, 2003 10:37 AM > Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinatef= roma MouseEvent >=20 >=20 > > Bonjour Paul, > >=20 > > I can't still figure how you use batik under eclipse? > >=20 > > What part of the SVG handling is managed by batik? > > How do you display SVG content inside your view? Do you parse the batik > > GVT making your own GVT to screen bridge? Do you generate a bitmap with > > batik to display it later in your view. Do you insert an JSVGCanvas in > > your view? > > The solution of your problem will probably depend on it. > >=20 > > Amicalement > > Philippe >=20 > Le mer 03/09/2003 =E0 09:47, Paul Sinnema a =E9crit : > > Philippe, > >=20 > > I'm currently building an Eclipse 'View' (yes it's the Open Source Proj= ect > > you are referring to) to display and manipulate SVG. The intent is to b= uild > > an UML Class Diagram which in turn will create an XML that can be > > transformed to an XMI with EMF in Eclipse. From there we are able to > > generate code for several applications (JAVA, DOTNet, C++....). All the > > code, for the view, is created by me (with a little help of Eclipse and= of > > course I've looked at other applications and copied where possible). > >=20 > > Paul. > >=20 > > ----- Original Message -----=20 > > From: "Philippe GIL" <dtorres@example.com> > > To: "Paul Sinnema" <dtorres@example.com> > > Sent: Wednesday, September 03, 2003 9:28 AM > > Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinat= efrom > > a MouseEvent > >=20 > >=20 > > Bonjour Paul, > >=20 > > I have some questions regarding your mail. > >=20 > > Does Eclipse mean the IBM open source project? (http://www.eclipse.org/= ) > > Are you displaying SVG files inside Eclipse plugins (views or editors)? > > What plugin are you using to display the SVG content, Java Advanced > > Imaging over holongate Batik support (http://www.holongate.org/), Dirk > > Lemmerman's Batik SVG Viewer > > (http://www.eclipse-workbench.com/jsp/plugin_detail.jsp?id=3D139&cat=3D= 27) > > or another way? > >=20 > > The project I'm working on, need to edit SVG file under Eclipse > > run-time. > >=20 > > Amicalement > > Philippe > >=20 > >=20 > > Le mar 02/09/2003 =E0 15:21, Paul Sinnema a =E9crit : > > > Hi, > > > > > > I've been struggling with several issues using Batik as the main disp= lay > > for an new UML Class Diagram in Eclipse. I've solved several of the iss= ues, > > but I'm kinda stuck right now. > > > > > > In my 'view' I use an Interactor to get actions from the mouse (click= , > > press, etc...). I would like to be able to drag a <g> from one place to > > another (make it topped, resize, etc....) for that I need to know which > > element in the DOM tree was clicked, dragged, etc.... > > > > > > Has anyone got any experience with this? > > > > > > Paul. > >=20 > >=20 > >=20 > >=20 > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dtorres@example.com > > For additional commands, e-mail: dtorres@example.com > >=20 >=20 >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: dtorres@example.com > For additional commands, e-mail: dtorres@example.com >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: dtorres@example.com For additional commands, e-mail: dtorres@example.com From batikdtorres@example.com Wed Sep 03 13:11:47 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 64553 invoked from network); 3 Sep 2003 13:11:46 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Sep 2003 13:11:46 -0000 Received: (qmail 97269 invoked by uid 500); 3 Sep 2003 13:11:37 -0000 Delivered-To: dtorres@example.com Received: (qmail 97243 invoked by uid 500); 3 Sep 2003 13:11:37 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 97204 invoked from network); 3 Sep 2003 13:11:36 -0000 Message-ID: <dtorres@example.com> Date: Wed, 03 Sep 2003 09:11:09 -0400 From: Thomas DeWeese <dtorres@example.com> Organization: Eastman Kodak Company User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dtorres@example.com Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinatefroma MouseEvent References: <dtorres@example.com> <1062574089.2296.23.camel@popgi01> <dtorres@example.com> <1062578238.2296.33.camel@popgi01> <dtorres@example.com> <1062592606.2296.103.camel@popgi01> In-Reply-To: <1062592606.2296.103.camel@popgi01> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Philippe GIL wrote: > Bonjour Paul, >=20 > Thanks for your code. You are using SWT_AWT class. Does it still > experimental and only for win32? >=20 > That's working code when the JSVGCanvas is added to a JPanel; >=20 > addEventListener is called for each svg element you need to get inputs > getCurrentTarget returns the "clicked" Element. > This code is thead-safe in case your mouse action need to update the > DOM. Hi Pilippe, I appreciate your taking our stern warnings about always modifying t= he DOM in the update manager thread to heart. However you can rest assure t= hat if Batik calls an event listener it will be called in the Update Manager Thr= ead (unless someone, hopefully from outside Batik, mistakenly dispatches an e= vent to the DOM from another thread). Thanks for taking the time to post this nice example! > public class OnClickAction implements EventListener, Runnable { > Event evt; >=20 > public void handleEvent(Event evt) { > this.evt =3D evt; >=20 > if (Thread.currentThread() =3D=3D svgCanvas.getUpdateManager(). > getUpdateRunnableQueue().getThread()){ Element elt; > =20 > elt =3D (Element)(evt.getCurrentTarget()); > if (elt !=3D null) { > String svgid =3D elt.getAttribute("id"); > //etc... > } > } =20 > else { > try { > svgCanvas.getUpdateManager(). > getUpdateRunnableQueue().invokeLater (this); > } > catch (Exception e) { > e.printStackTrace(); > } > } > } >=20 > public void run() { > handleEvent(evt); > } =20 >=20 > Amicalement > philippe >=20 > Le mer 03/09/2003 =E0 11:19, Paul Sinnema a =E9crit : >=20 >>Philippe, >> >>All the SVG handling is done by batik. >>I've inserted the JSVGCanvas in the view (still have a flicker problem = during drawing, I think it's because the JSVGCanvas is added to an SWT pa= nel which is also redrawn). >> >>Since this morning I've got the following code working. If this is the = correct way to do things, I then need to know how to get the DOM Node or = Element from the Event! >> >> private static final String MOUSE_CLICK=3D "click"; >> private static final String MOUSE_MOVE=3D "mousemove"; >> private static final String MOUSE_DOWN=3D "mousedown"; >> private static final String MOUSE_UP=3D "mouseup"; >> >> private void handleMyEvent(Event event) >> { >> EventTarget et=3D event.getTarget(); >> >> setTitleText( >> " Type =3D " >> + event.getType() >> + " Phase =3D " >> + event.getEventPhase() >> + " Current target =3D " >> + et.getClass() >> + " Timestamp =3D " >> + event.getTimeStamp()); >> } >> >> public void createPartControl(final Composite parent) >> { >> try >> { >> svgCanvas=3D new JSVGCanvas(new MyUserAgent(), true, true); >> svgCanvas.setDoubleBuffered(true); >> svgCanvas.setDoubleBufferedRendering(true); >> svgCanvas.addSVGLoadEventDispatcherListener(new SVGLoadEventDispatch= erListener() >> { >> >> public void svgLoadEventDispatchStarted(SVGLoadEventDispatcherEvent= arg0) >> { >> // setTitleText("svgLoadEventDispatchStarted"); >> } >> >> public void svgLoadEventDispatchCompleted(SVGLoadEventDispatcherEve= nt arg0) >> { >> SVGSVGElement root=3D svgCanvas.getSVGDocument().getRootElement();= >> root.addEventListener(MOUSE_CLICK, new EventListener() >> { >> public void handleEvent(Event arg0) >> { >> handleMyEvent(arg0); >> } >> }, true); >> root.addEventListener(MOUSE_MOVE, new EventListener() >> { >> public void handleEvent(Event arg0) >> { >> handleMyEvent(arg0); >> } >> }, true); >> root.addEventListener(MOUSE_DOWN, new EventListener() >> { >> public void handleEvent(Event arg0) >> { >> handleMyEvent(arg0); >> } >> }, true); >> root.addEventListener(MOUSE_UP, new EventListener() >> { >> public void handleEvent(Event arg0) >> { >> handleMyEvent(arg0); >> } >> }, true); >> } >> >> public void svgLoadEventDispatchCancelled(SVGLoadEventDispatcherEve= nt arg0) >> { >> // setTitleText("svgLoadEventDispatchCancelled"); >> } >> >> public void svgLoadEventDispatchFailed(SVGLoadEventDispatcherEvent = arg0) >> { >> // setTitleText("svgLoadEventDispatchFailed"); >> } >> }); >> awtPanel=3D SWT_AWT.new_Panel(parent); >> awtPanel.setLayout(new BorderLayout()); >> awtPanel.add("Center", svgCanvas); >> shell=3D getViewSite().getShell(); >> >> createActions(); >> } catch (Throwable t) >> { >> t.printStackTrace(); >> } >> >> getViewSite().getPage().addSelectionListener(this); >> } >> >>Paul. >> >>----- Original Message -----=20 >>From: "Philippe GIL" <dtorres@example.com> >>To: "Paul Sinnema" <dtorres@example.com> >>Sent: Wednesday, September 03, 2003 10:37 AM >>Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinat= efroma MouseEvent >> >> >> >>>Bonjour Paul, >>> >>>I can't still figure how you use batik under eclipse? >>> >>>What part of the SVG handling is managed by batik? >>>How do you display SVG content inside your view? Do you parse the bati= k >>>GVT making your own GVT to screen bridge? Do you generate a bitmap wit= h >>>batik to display it later in your view. Do you insert an JSVGCanvas in= >>>your view? >>>The solution of your problem will probably depend on it. >>> >>>Amicalement >>>Philippe >> >>Le mer 03/09/2003 =E0 09:47, Paul Sinnema a =E9crit : >> >>>Philippe, >>> >>>I'm currently building an Eclipse 'View' (yes it's the Open Source Pro= ject >>>you are referring to) to display and manipulate SVG. The intent is to = build >>>an UML Class Diagram which in turn will create an XML that can be >>>transformed to an XMI with EMF in Eclipse. From there we are able to >>>generate code for several applications (JAVA, DOTNet, C++....). All th= e >>>code, for the view, is created by me (with a little help of Eclipse an= d of >>>course I've looked at other applications and copied where possible). >>> >>>Paul. >>> >>>----- Original Message -----=20 >>>From: "Philippe GIL" <dtorres@example.com> >>>To: "Paul Sinnema" <dtorres@example.com> >>>Sent: Wednesday, September 03, 2003 9:28 AM >>>Subject: Re: Finding an Element (Node) in the DOM with an X Y coordina= tefrom >>>a MouseEvent >>> >>> >>>Bonjour Paul, >>> >>>I have some questions regarding your mail. >>> >>>Does Eclipse mean the IBM open source project? (http://www.eclipse.org= /) >>>Are you displaying SVG files inside Eclipse plugins (views or editors)= ? >>>What plugin are you using to display the SVG content, Java Advanced >>>Imaging over holongate Batik support (http://www.holongate.org/), Dirk= >>>Lemmerman's Batik SVG Viewer >>>(http://www.eclipse-workbench.com/jsp/plugin_detail.jsp?id=3D139&cat=3D= 27) >>>or another way? >>> >>>The project I'm working on, need to edit SVG file under Eclipse >>>run-time. >>> >>>Amicalement >>>Philippe >>> >>> >>>Le mar 02/09/2003 =E0 15:21, Paul Sinnema a =E9crit : >>> >>>>Hi, >>>> >>>>I've been struggling with several issues using Batik as the main disp= lay >>> >>>for an new UML Class Diagram in Eclipse. I've solved several of the is= sues, >>>but I'm kinda stuck right now. >>> >>>>In my 'view' I use an Interactor to get actions from the mouse (click= , >>> >>>press, etc...). I would like to be able to drag a <g> from one place t= o >>>another (make it topped, resize, etc....) for that I need to know whic= h >>>element in the DOM tree was clicked, dragged, etc.... >>> >>>>Has anyone got any experience with this? >>>> >>>>Paul. >>> >>> >>> >>> >>>--------------------------------------------------------------------- >>>To unsubscribe, e-mail: dtorres@example.com >>>For additional commands, e-mail: dtorres@example.com >>> >> >> >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: dtorres@example.com >>For additional commands, e-mail: dtorres@example.com >> >=20 >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: dtorres@example.com > For additional commands, e-mail: dtorres@example.com >=20 >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: dtorres@example.com For additional commands, e-mail: dtorres@example.com From batikdtorres@example.com Wed Sep 03 13:44:38 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 83494 invoked from network); 3 Sep 2003 13:44:38 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Sep 2003 13:44:38 -0000 Received: (qmail 91763 invoked by uid 500); 3 Sep 2003 13:43:14 -0000 Delivered-To: dtorres@example.com Received: (qmail 91566 invoked by uid 500); 3 Sep 2003 13:43:10 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 91399 invoked from network); 3 Sep 2003 13:43:06 -0000 Message-ID: <dtorres@example.com> Date: Wed, 03 Sep 2003 09:42:53 -0400 From: Thomas DeWeese <dtorres@example.com> Organization: Eastman Kodak Company User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1) Gecko/20030425 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dtorres@example.com Subject: Re: Finding an Element (Node) in the DOM with an X Y coordinatefroma MouseEvent References: <dtorres@example.com> <1062574089.2296.23.camel@popgi01> <dtorres@example.com> <1062578238.2296.33.camel@popgi01> <dtorres@example.com> <1062592606.2296.103.camel@popgi01> In-Reply-To: <1062592606.2296.103.camel@popgi01> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Philippe GIL wrote: > Bonjour Paul, > > Thanks for your code. You are using SWT_AWT class. Does it still > experimental and only for win32? > > That's working code when the JSVGCanvas is added to a JPanel; > > addEventListener is called for each svg element you need to get inputs > getCurrentTarget returns the "clicked" Element. Actually getCurrentTarget is the element the event listener is registered on. getTarget() is the element that the user clicked on. To understand why there are both you need to understand DOM event dispatching - all events travel from the root of the document to the element receiving the event (the element 'clicked on'), this phase is called event capture. As the event propagates it calls any event listeners that are registered with 'true' as the third parameter. Then all listeners on the element receiving the event are called. Then the event 'bubbles' back to the root of the document tree, calling any listeners that are registered with 'false' as the third parameter (this is also when onXXX event attributes are dispatched). This way you can register one event listener on the root of the SVG tree and receive essentially all events in the DOM tree, (you can also do this for a subgroup and just get events from that subtree) and you can tell what element was clicked by checking the getTarget() function. > EventListener onClick = new OnClickAction(); > > EventTarget t; > > t = (EventTarget)(svgCanvas.getSVGDocument(). > getElementById(svgid)); > > // Adds a 'onclick' listener > t.addEventListener("click", onClick, false); This registers 'onClick' to recieve events during the 'bubbling' phase. --------------------------------------------------------------------- To unsubscribe, e-mail: dtorres@example.com For additional commands, e-mail: dtorres@example.com From batikdtorres@example.com Wed Sep 03 17:16:03 2003 Return-Path: <batikdtorres@example.com> Delivered-To: dtorres@example.com Received: (qmail 98159 invoked from network); 3 Sep 2003 17:16:03 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 3 Sep 2003 17:16:03 -0000 Received: (qmail 98625 invoked by uid 500); 3 Sep 2003 16:49:12 -0000 Delivered-To: dtorres@example.com Received: (qmail 98586 invoked by uid 500); 3 Sep 2003 16:49:11 -0000 Mailing-List: contact dtorres@example.com; run by ezmlm Precedence: bulk List-Post: <mailto:dtorres@example.com> List-Help: <mailto:dtorres@example.com> List-Unsubscribe: <mailto:dtorres@example.com> List-Subscribe: <mailto:dtorres@example.com> Reply-To: dtorres@example.com Delivered-To: mailing list dtorres@example.com Received: (qmail 98519 invoked from network); 3 Sep 2003 16:49:10 -0000 From: "Paul Sinnema" <dtorres@example.com> To: <dtorres@example.com> Subject: RE: Finding an Element (Node) in the DOM with an X Ycoordinatefroma MouseEvent Date: Wed, 3 Sep 2003 18:49:09 +0200 Message-ID: <dtorres@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 In-Reply-To: <1062592606.2296.103.camel@popgi01> Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Philippe, Thanks for the input. I, quite suddenly, had to go to a customer this afternoon. I haven't been able to try the example yet. I will try it tomorrow morning (eurpean time). Paul. -----Original Message----- From: Philippe GIL [mailto:dtorres@example.com]=20 Sent: woensdag 3 september 2003 14:37 To: dtorres@example.com Subject: Re: Finding an Element (Node) in the DOM with an X Ycoordinatefroma MouseEvent Bonjour Paul, Thanks for your code. You are using SWT_AWT class. Does it still experimental and only for win32? That's working code when the JSVGCanvas is added to a JPanel; addEventListener is called for each svg element you need to get inputs getCurrentTarget returns the "clicked" Element. This code is thead-safe in case your mouse action need to update the DOM. EventListener onClick =3D new OnClickAction(); EventTarget t; =20 t =3D (EventTarget)(svgCanvas.getSVGDocument(). getElementById(svgid)); =20 // Adds a 'onclick' listener t.addEventListener("click", onClick, false); public class OnClickAction implements EventListener, Runnable { Event evt; public void handleEvent(Event evt) { this.evt =3D evt; if (Thread.currentThread() =3D=3D svgCanvas.getUpdateManager(). =09 getUpdateRunnableQueue().getThread()){ Element elt; =20 elt =3D (Element)(evt.getCurrentTarget()); if (elt !=3D null) { String svgid =3D elt.getAttribute("id"); //etc... } } =20 else { try { svgCanvas.getUpdateManager(). getUpdateRunnableQueue().invokeLater (this); } catch (Exception e) { e.printStackTrace(); } } } public void run() { handleEvent(evt); } =20 Amicalement philippe Le mer 03/09/2003 =E0 11:19, Paul Sinnema a =E9crit : > Philippe, >=20 > All the SVG handling is done by batik. > I've inserted the JSVGCanvas in the view (still have a flicker problem > during drawing, I think it's because the JSVGCanvas is added to an SWT > panel which is also redrawn). >=20 > Since this morning I've got the following code working. If this is the > correct way to do things, I then need to know how to get the DOM Node=20 > or Element from the Event! >=20 > private static final String MOUSE_CLICK=3D "click"; > private static final String MOUSE_MOVE=3D "mousemove"; > private static final String MOUSE_DOWN=3D "mousedown"; > private static final String MOUSE_UP=3D "mouseup"; >=20 > private void handleMyEvent(Event event) > { > EventTarget et=3D event.getTarget(); >=20 > setTitleText( > " Type =3D " > + event.getType() > + " Phase =3D " > + event.getEventPhase() > + " Current target =3D " > + et.getClass() > + " Timestamp =3D " > + event.getTimeStamp()); > } >=20 > public void createPartControl(final Composite parent) > { > try > { > svgCanvas=3D new JSVGCanvas(new MyUserAgent(), true, true); > svgCanvas.setDoubleBuffered(true); > svgCanvas.setDoubleBufferedRendering(true); > svgCanvas.addSVGLoadEventDispatcherListener(new SVGLoadEventDispatcherListener() > { >=20 > public void svgLoadEventDispatchStarted(SVGLoadEventDispatcherEvent arg0) > { > // setTitleText("svgLoadEventDispatchStarted"); > } >=20 > public void svgLoadEventDispatchCompleted(SVGLoadEventDispatcherEvent arg0) > { > SVGSVGElement root=3D = svgCanvas.getSVGDocument().getRootElement(); > root.addEventListener(MOUSE_CLICK, new EventListener() > { > public void handleEvent(Event arg0) > { > handleMyEvent(arg0); > } > }, true); > root.addEventListener(MOUSE_MOVE, new EventListener() > { > public void handleEvent(Event arg0) > { > handleMyEvent(arg0); > } > }, true); > root.addEventListener(MOUSE_DOWN, new EventListener() > { > public void
{'source': 'Apache Software Foundation Public Mail Archives'}