Are u sure abt that? I haven't done any testing in gwt for it. If u hv done, please share the details since have started using this extensively in my project.
My experience from pure javascript is that one single handler at document level is much better that having several handlers on various buttons and anchors. Thanks. On Tue, Jan 26, 2010 at 4:47 PM, DaveC <[email protected]>wrote: > I've run into (perfornance) issues using a NativePreviewHandler as it > will recieve *ALL* events (mouseover/out/move/up/down etc, etc...) > which is why I don't use that method. > > On Jan 26, 11:08 am, Fazeel Kazi <[email protected]> wrote: > > Another simpler solution using EventPreview: > > > > Event.addNativePreviewHandler(new Event.NativePreviewHandler() > > { > > public void onPreviewNativeEvent(NativePreviewEvent foEvent) > > { > > switch(foEvent.getTypeInt()) > > { > > case Event.ONCLICK: handleClick(foEvent); break; > > case Event.ONMOUSEOVER: handleMouseOver(foEvent); break; > > }// end switch > > } > > > > }); > > > > Regards. > > > > On Tue, Jan 26, 2010 at 3:09 PM, DaveC > > <[email protected]>wrote: > > > > > The way I've done it (I think is): > > > > > 1. Create a new Class that extends Widget and implements > > > HasMouseMoveHandlers > > > > > 2. Grab the RootPanel Element and pass that into your new Class > > > constructor (the one that takes an Element as a param) - this should > > > call setElement(Element element) with you passed in element... > > > > > You can now add MouseMove handlers to you new Widget... > > > > > On Jan 26, 12:49 am, markww <[email protected]> wrote: > > > > Hi, > > > > > > Is there a way to listen for mousemoves on the main document? In > > > > javascript, I usually do this: > > > > > > window.onload = function() { > > > > document.onmousemove = function(e) { > > > > alert("the mouse was moved!"); > > > > }; > > > > } > > > > > > can we add some sort of similar listener in GWT? I'm just not sure > > > > where to start, > > > > > > Thanks > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Google Web Toolkit" group. > > > To post to this group, send email to > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<google-web-toolkit%[email protected]> > <google-web-toolkit%[email protected]<google-web-toolkit%[email protected]> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-web-toolkit?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
