From 489bc11ea807e3b036a00592015d5193454c9b8b Mon Sep 17 00:00:00 2001 From: John Alhroos Date: Wed, 27 Apr 2011 05:50:06 +0000 Subject: [PATCH] Added mouse click details to NativeButton #6605 svn changeset:18481/svn branch:6.6 --- src/com/vaadin/terminal/gwt/client/ui/VNativeButton.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; } -- 2.39.5