[Draw2D]Howto comsume mouse event inside a Figure on top of a Canvas [message #495569] |
Thu, 05 November 2009 11:14 |
Eclipse User |
|
|
|
Originally posted by: Gerhard.Hinterndorfer.pedrics.at
Hello,
I am using Eclipse 3.2.2 and Draw2D 3.2.1 and have created the following
canvas - lws structure:
1) created a Canvas
2) created a lws on top of the canvas
3) added a addMouseListener to the Canvas containing a
mouseDown(MouseEvent e) handling
public void mouseDown(MouseEvent e){
System.out.println (" Canvas Mouse down event!");
}
4) added some Figures to the lws having a MouseListener containg
mousePressed(MouseEvent me) handling
public void mousePressed(MouseEvent me){
System.out.println (" Figure Mouse pressed event!");
me.consume();
}
Now I do have the following issue:
When I press the Figure I get the following output:
Figure Mouse pressed event!
Canvas Mouse down event!
so the mouse pressed event is not consumed inside the Figure. This means
the SWT Event Dispatcher doesn't evaluate the consume flag inside the
org.eclipse.draw2d.InputEvent.
Is there a possibility to consume the event somehow inside the Figure
also for the SWT Canvas?
If the behaviour changed to the new eclipse/draw2D version, than a
version upgrade would also be an option for me.
Thanks for your help in advance
best regards
Gerhard
|
|
|
Powered by
FUDForum. Page generated in 0.24088 seconds