Mouse Over listener for FlexTable in GWT 1.7?

If you want to add a MouseOverHandler to a FlexTable try this.

If you want to add a MouseOverHandler to a FlexTable try this: public class MyFlexTable extends FlexTable implements MouseOverHandler, HasMouseOverHandler { public MyFlexTable() { this. AddMouseOverHandler(this); } public void onMouseOver(MouseOverEvent event) { //do something } public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) { return addDomHandler(handler, MouseOverEvent.getType()); } }.

Starting in GWT 1.6 you use Handlers instead of Listeners. So for example, for hovering you would add a MouseOverHandler and MouseOutHandler. The FlexTable itself doesn't implement these interfaces so you'll probably want to implement it on the widgets contained in the FlexTable.

For example, myWidget. AddMouseOverHandler(new MouseOverHandler(){ void onMouseOver(MouseOverEvent event){ doHovering(); } }); Similarly for adding a MouseOutHandler.

I found this link but I don't really understand how it works: java2s. Com/Code/Java/GWT/TableMouseOverEvent. Htm – drozzy Nov 27 '09 at 19:20 Also this shows how to implement this.. but I can't seem to cast the event to the elent that generated it: (Label)event.getEventTarget() doesn't work!

Code.google. Com/webtoolkit/articles/… – drozzy Nov 27 '09 at 19:47 As for implementing this on a FlexTable, the FlexTable does not implement these interfaces.In the example you link to they are extending FlexTable as Table then adding the handlers to Table. You could something similar or perphaps just wrap a FlexTable with another widget that implements HasMouseOverHandler, for example a FocusPanel.

As for how to find the target of the event, there is no getEventTarget method on the MouseOverEvent. The target of the vent is of course the widget that is implementing the MouseOverHandler. – Joel Nov 27 '09 at 22:44.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions