You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Paul Sinnema <pa...@paulsinnema.com> on 2003/09/02 14:50:47 UTC

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.

Re: Finding an Element (Node) in the DOM with an X Y coordinate from a MouseEvent

Posted by Thomas DeWeese <Th...@Kodak.com>.
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: batik-dev@xml.apache.org 
>   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: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org


Re: Finding an Element (Node) in the DOM with an X Y coordinate from a MouseEvent

Posted by Paul Sinnema <pa...@paulsinnema.com>.
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 ----- 
  From: Paul Sinnema 
  To: batik-dev@xml.apache.org 
  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.