|
Re: Has anyone implemented GlassPane functionality [message #179612 is a reply to message #179596] |
Thu, 28 April 2005 20:38 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
If you want to stop all mouse events from going to the child figures, why
not just override findMouseEventTargetAt(x,y), to always be the container.
Layers are transparent by default, meaning they will not return themselves
as the mouse target. You can also change this function by looking at what
they override.
"Jim Adams" <jim.adams@sas.com> wrote in message
news:d4rh6c$9n4$1@news.eclipse.org...
> In Swing I can create a GlassPane which is a transparent container that
> stops mouse events. How can I do this in D2D? I tried creating a layer
> that had nothing in it and putting mouse listeners on the layer. Since I
> contained no child figures I never got a chance to handle the mouse event.
> Next I put the listeners on the LayeredPane itself but it still failed the
> hittest. I ended up adding a Figure to the Glass layer that filled the
> whole layer but always returned true for the containsPoint() method. This
> seems the supreme hack so I was hoping I did this wrong and someone has
> the real solution.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03388 seconds