I added click handler to flowpanel as follows
this.addDomHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event) {
Window.alert("event.getX()="+event.getX()+" event.getY()="+event.getY());
Window.alert("event.getClientX()="+event.getClientX()+" event.getClientY()="+event.getClientY());
}
},ClickEvent.getType());
… as I could get it getX() returns mouse position within flowpanel but getClientX() returns another value and I couldn’t get the value is coming from. So my question is what is the getClientXY() methods are used for?
P.S
GWT 2.2/2.3
The javadoc is clear:
getClientX: Gets the mouse x-position within the browser window‘s client area.getX: Gets the mouse x-position relative to the event’s current target element.So, you can use getClientX to get the absolute
leftposition of some element.