From: John Alhroos Date: Wed, 27 Apr 2011 05:50:06 +0000 (+0000) Subject: Added mouse click details to NativeButton #6605 X-Git-Tag: 6.7.0.beta1~262 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=489bc11ea807e3b036a00592015d5193454c9b8b;p=vaadin-framework.git Added mouse click details to NativeButton #6605 svn changeset:18481/svn branch:6.6 --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java b/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java index 7cbaca1c19..49b878f611 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java @@ -1,4 +1,4 @@ -/* +/* @ITMillApache2LicenseForJavaFiles@ */ @@ -21,6 +21,7 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.BrowserInfo; import com.vaadin.terminal.gwt.client.EventHelper; import com.vaadin.terminal.gwt.client.EventId; +import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.terminal.gwt.client.Paintable; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.Util; @@ -201,6 +202,11 @@ public class VNativeButton extends Button implements Paintable, ClickHandler, VNativeButton.this.setFocus(true); } + // Add mouse details + MouseEventDetails details = new MouseEventDetails( + event.getNativeEvent(), getElement()); + client.updateVariable(id, "mousedetails", details.serialize(), false); + client.updateVariable(id, "state", true, true); clickPending = false; }