From a21464620881742f28b233864bf8c35f74728ad0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Johannes=20Dahlstr=C3=B6m?= Date: Tue, 15 May 2012 08:14:45 +0000 Subject: [PATCH] #8763 Re-added TouchScrollDelegate#setElements() svn changeset:23737/svn branch:6.8 --- .../terminal/gwt/client/ui/TouchScrollDelegate.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/TouchScrollDelegate.java b/src/com/vaadin/terminal/gwt/client/ui/TouchScrollDelegate.java index 4e19f66b14..7302f9f2ac 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/TouchScrollDelegate.java +++ b/src/com/vaadin/terminal/gwt/client/ui/TouchScrollDelegate.java @@ -118,9 +118,7 @@ public class TouchScrollDelegate implements NativePreviewHandler { } else { delegate = null; } - for (Element scrollable : scrollables) { - addElement(scrollable); - } + setElements(scrollables); } public void onTouchStart(TouchStartEvent event) { @@ -192,7 +190,7 @@ public class TouchScrollDelegate implements NativePreviewHandler { } public TouchScrollDelegate(Element... elements) { - scrollableElements = new HashSet(Arrays.asList(elements)); + setElements(elements); } public void setScrollHandler(ScrollHandler scrollHandler) { @@ -640,6 +638,10 @@ public class TouchScrollDelegate implements NativePreviewHandler { } } + public void setElements(Element[] elements) { + scrollableElements = new HashSet(Arrays.asList(elements)); + } + /** * long calcucation are not very efficient in GWT, so this helper method * returns timestamp in double. -- 2.39.5