diff options
author | Artur Signell <artur@vaadin.com> | 2012-03-29 18:22:46 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-03-29 18:22:46 +0300 |
commit | 18ce0109fa767e1d91333cef55e0e528e64818d7 (patch) | |
tree | fa8ae0198fcdcd15c72b37f93eeed927259c93aa /src/com/vaadin/event | |
parent | 750abe0d1c909fc9f234c484162fbbfec046691e (diff) | |
download | vaadin-framework-18ce0109fa767e1d91333cef55e0e528e64818d7.tar.gz vaadin-framework-18ce0109fa767e1d91333cef55e0e528e64818d7.zip |
Refactored ClickEventHandler and LayoutClickEventHandler to use RPC
Diffstat (limited to 'src/com/vaadin/event')
-rw-r--r-- | src/com/vaadin/event/LayoutEvents.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/vaadin/event/LayoutEvents.java b/src/com/vaadin/event/LayoutEvents.java index 2dda15fbf5..960fff00c0 100644 --- a/src/com/vaadin/event/LayoutEvents.java +++ b/src/com/vaadin/event/LayoutEvents.java @@ -7,9 +7,11 @@ import java.io.Serializable; import java.lang.reflect.Method; import com.vaadin.event.MouseEvents.ClickEvent; +import com.vaadin.terminal.gwt.client.Connector; import com.vaadin.terminal.gwt.client.MouseEventDetails; import com.vaadin.tools.ReflectTools; import com.vaadin.ui.Component; +import com.vaadin.ui.ComponentContainer; public interface LayoutEvents { @@ -120,5 +122,17 @@ public interface LayoutEvents { return childComponent; } + public static LayoutClickEvent createEvent(ComponentContainer layout, + MouseEventDetails mouseDetails, Connector clickedConnector) { + Component clickedComponent = (Component) clickedConnector; + Component childComponent = clickedComponent; + while (childComponent != null + && childComponent.getParent() != layout) { + childComponent = childComponent.getParent(); + } + + return new LayoutClickEvent(layout, mouseDetails, clickedComponent, + childComponent); + } } }
\ No newline at end of file |