[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: Old style event fixes, part 2
From: |
Anthony Balkissoon |
Subject: |
Re: [cp-patches] FYI: Old style event fixes, part 2 |
Date: |
Mon, 16 Jan 2006 10:14:27 -0500 |
On Fri, 2006-01-13 at 21:29 +0000, Roman Kennke wrote:
> This is the second part for the old (1.0) style AWT event handling. The
> problem that is fixed here is that events that are targetted at menu
> components (like ActionEvents) must be forwarded along the parent chain
> and finally must end up in the frame that holds the menu bar (I have an
> application here that expects exactly this). Unfortunatly, the MenuBar
> knows nothing about its parent frame (MenuBars are not part of the
> normal component hierarchy, also they are not derived from Component).
> MenuBar.getParent() returns null. So I had to add a reference to the
> parent frame to MenuBar and forward the event this way.
>
I haven't looked at this stuff, but this resembles very much what
happens in Swing's KeyboardManager class. I don't know if the AWT
handles it the same way or not, but you might want to look at how it's
handled in Swing.
Cheers,
--Tony