]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added mouse click details to NativeButton #6605
authorJohn Alhroos <john.ahlroos@itmill.com>
Wed, 27 Apr 2011 05:50:06 +0000 (05:50 +0000)
committerJohn Alhroos <john.ahlroos@itmill.com>
Wed, 27 Apr 2011 05:50:06 +0000 (05:50 +0000)
svn changeset:18481/svn branch:6.6

src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java

index 7cbaca1c1984f72e3fbc22f36281ff1bf4a071cd..49b878f611f8a51baddf0577324dc290f5d4b4d7 100644 (file)
@@ -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;
     }