]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix actions in action menu appearing in random order #12250
authorPatrik Lindström <patrik@vaadin.com>
Tue, 30 Jul 2013 11:14:07 +0000 (14:14 +0300)
committerVaadin Code Review <review@vaadin.com>
Tue, 30 Jul 2013 12:49:49 +0000 (12:49 +0000)
Change-Id: I77186adb94392cd317d37b9d9250f28891e6f06e

server/src/com/vaadin/ui/Calendar.java

index 8b8cc7b4752b238d4e1191168c59ee060d5671c5..9ccc8ea2d9c70f0d5de373dc2ccfdc1caef3b77f 100644 (file)
@@ -26,7 +26,7 @@ import java.util.Date;
 import java.util.EventListener;
 import java.util.GregorianCalendar;
 import java.util.HashMap;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
@@ -573,7 +573,7 @@ public class Calendar extends AbstractComponent implements
             CalendarDateRange range = new CalendarDateRange(s, e, getTimeZone());
             Action[] actions = actionHandler.getActions(range, this);
             if (actions != null) {
-                Set<Action> actionSet = new HashSet<Action>(
+                Set<Action> actionSet = new LinkedHashSet<Action>(
                         Arrays.asList(actions));
                 actionMap.put(range, actionSet);
             }
@@ -587,7 +587,8 @@ public class Calendar extends AbstractComponent implements
                 getTimeZone());
         Action[] actions = actionHandler.getActions(range, this);
         if (actions != null) {
-            Set<Action> actionSet = new HashSet<Action>(Arrays.asList(actions));
+            Set<Action> actionSet = new LinkedHashSet<Action>(
+                    Arrays.asList(actions));
             actionMap.put(range, actionSet);
         }
     }
@@ -1872,4 +1873,4 @@ public class Calendar extends AbstractComponent implements
             dropHandler.getAcceptCriterion().paint(target);
         }
     }
-}
\ No newline at end of file
+}