]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #6875
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 21 Apr 2011 16:55:34 +0000 (16:55 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 21 Apr 2011 16:55:34 +0000 (16:55 +0000)
svn changeset:18437/svn branch:6.6

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

index bc0b0367bd488a3812dd20bea87267ce8b8b5658..f0438700fddccdbc709342869793613eacf19486 100644 (file)
@@ -9,6 +9,7 @@ import java.util.Date;
 import java.util.EventObject;\r
 import java.util.Iterator;\r
 \r
+import com.google.gwt.core.client.Scheduler;\r
 import com.google.gwt.event.dom.client.KeyCodes;\r
 import com.google.gwt.user.client.DOM;\r
 import com.google.gwt.user.client.Element;\r
@@ -50,6 +51,7 @@ public class VNotification extends VOverlay {
     private String temporaryStyle;\r
 \r
     private ArrayList<EventListener> listeners;\r
+    private static final int TOUCH_DEVICE_IDLE_DELAY = 1000;\r
 \r
     public VNotification() {\r
         setStyleName(STYLENAME);\r
@@ -60,6 +62,15 @@ public class VNotification extends VOverlay {
     public VNotification(int delayMsec) {\r
         this();\r
         this.delayMsec = delayMsec;\r
+        if(BrowserInfo.get().isTouchDevice()) {\r
+            new Timer(){\r
+                @Override\r
+                public void run() {\r
+                    if(isAttached()) {\r
+                        fade();\r
+                    }\r
+                }}.schedule(delayMsec + TOUCH_DEVICE_IDLE_DELAY );\r
+        }\r
     }\r
 \r
     public VNotification(int delayMsec, int fadeMsec, int startOpacity) {\r