GWT MouseOut event on a Composite
I have:
- created a Composite,
- initWidget-ed with an AbsolutePanel
- added some Widgets to the Composite
- in the Composite constructor attached a MouseOut handler
What I wanted to reach is detecting when the mouse is out of th开发者_如何学编程e Composite (or AbsolutePanel), but the MouseOut handler is fired whenever the mouse is out of any wideget in the AbsolutePanel.
Is there any clean way I can reach detecting the AbsolutePanel out?
The GWT I'm using is 2.0, with no add-ons (and I don't want to use any).
OK, I've found a solution.
I extended the AbsolutePanel class, so that implements HasMouseoutHandlers. Now, instead of adding MouseHandler to the Composite, I add it to the MyAbsolutePanel only. This works fine.
精彩评论