]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merge from 6.6
authorHenri Sara <henri.sara@itmill.com>
Thu, 16 Jun 2011 07:19:43 +0000 (07:19 +0000)
committerHenri Sara <henri.sara@itmill.com>
Thu, 16 Jun 2011 07:19:43 +0000 (07:19 +0000)
svn changeset:19412/svn branch:6.7

51 files changed:
1  2 
WebContent/VAADIN/themes/base/menubar/img/check.gif
WebContent/VAADIN/themes/base/menubar/menubar.css
WebContent/VAADIN/themes/reindeer/button/img/black-button-sprites-ie6.png
WebContent/VAADIN/themes/reindeer/button/img/black-button-sprites.png
WebContent/VAADIN/themes/reindeer/button/img/button-sprites-ie6.png
WebContent/VAADIN/themes/reindeer/button/img/button-sprites.png
WebContent/VAADIN/themes/reindeer/common/img/black-vertical-sprites-ie6.png
WebContent/VAADIN/themes/reindeer/common/img/black-vertical-sprites.png
WebContent/VAADIN/themes/reindeer/common/img/horizontal-sprites.png
WebContent/VAADIN/themes/reindeer/common/img/vertical-sprites-ie6.png
WebContent/VAADIN/themes/reindeer/common/img/vertical-sprites.png
WebContent/VAADIN/themes/reindeer/menubar/img/checked-selected.png
WebContent/VAADIN/themes/reindeer/menubar/img/checked.png
WebContent/VAADIN/themes/reindeer/menubar/img/unchecked-selected.png
WebContent/VAADIN/themes/reindeer/menubar/img/unchecked.png
WebContent/VAADIN/themes/reindeer/menubar/menubar.css
WebContent/VAADIN/themes/runo/select/select.css
WebContent/VAADIN/themes/sampler/icons/sampleicons/75-MenuBarSelectableItems.gif
build/build.xml
src/com/vaadin/data/util/HierarchicalContainer.java
src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java
src/com/vaadin/terminal/gwt/client/ui/VOverlay.java
src/com/vaadin/terminal/gwt/client/ui/VScrollTable.java
src/com/vaadin/terminal/gwt/client/ui/VTextField.java
src/com/vaadin/terminal/gwt/client/ui/VWindow.java
src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java
src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
src/com/vaadin/terminal/gwt/server/WebBrowser.java
src/com/vaadin/ui/AbstractOrderedLayout.java
src/com/vaadin/ui/Button.java
src/com/vaadin/ui/MenuBar.java
tests/src/com/vaadin/tests/components/LongTooltip.html
tests/src/com/vaadin/tests/components/LongTooltip.java
tests/src/com/vaadin/tests/components/accordion/AccordionInactiveTabSize.java
tests/src/com/vaadin/tests/components/combobox/ComboBoxDataSourceChange.html
tests/src/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.html
tests/src/com/vaadin/tests/components/combobox/ComboBoxUndefinedWidthAndIcon.java
tests/src/com/vaadin/tests/components/menubar/MenuBarItemsCheckable.html
tests/src/com/vaadin/tests/components/menubar/MenuBarTest.java
tests/src/com/vaadin/tests/components/panel/PanelClickListenerRelativeCoordinates.html
tests/src/com/vaadin/tests/components/panel/PanelTest.java
tests/src/com/vaadin/tests/components/slider/SliderTest.java
tests/src/com/vaadin/tests/components/table/TableRemoveActionHandlers.html
tests/src/com/vaadin/tests/components/window/SubWindowOrder.html
tests/src/com/vaadin/tests/components/window/SubWindows-runo.html
tests/src/com/vaadin/tests/components/window/SubWindows.html
tests/src/com/vaadin/tests/components/window/WindowCaptionTest.html
tests/src/com/vaadin/tests/components/window/WindowTest.java
tests/src/com/vaadin/tests/server/container/TestHierarchicalContainer.java

index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..0a8919516854509a8cde46a9cc2afd9a5d77a89f
new file mode 100644 (file)
Binary files differ
index d1972ac4ec43610743e3cc5fff0dfea02b777b8a,1ce42ce65727e93d9ee79b7df8175526a4634d85..042ec15d1dd301e09d53d80cd59d2ebc47d4adbe
  .v-menubar-popup .popupContent:focus,
  .v-menubar-popup .popupContent .v-menubar-submenu:focus{
        outline: none;  
--}
++}
++/* Checkboxes for checkable/checked menu items */
++/* Checked/unchecked requires combined style selected-(un)checked for IE6 */
++.v-menubar-submenu-check-column .v-menubar-menuitem {
++      padding-left: 6px;
++}
++.v-menubar-submenu-check-column .v-menubar-menuitem-caption {
++      padding-left: 18px;
++}
++.v-menubar-submenu .v-menubar-menuitem-checked .v-menubar-menuitem-caption { 
++      background: transparent url(img/check.gif) no-repeat left;
++}
diff --cc WebContent/VAADIN/themes/reindeer/button/img/black-button-sprites-ie6.png
index 90a73be23fc9cc8ca0f0b171688dcb0d130c7b72,90a73be23fc9cc8ca0f0b171688dcb0d130c7b72..0000000000000000000000000000000000000000
deleted file mode 100644,100644
Binary files differ
diff --cc WebContent/VAADIN/themes/reindeer/button/img/black-button-sprites.png
index 744ca30d643559dd20ded437e9f04fe7a2e4f514,744ca30d643559dd20ded437e9f04fe7a2e4f514..0000000000000000000000000000000000000000
deleted file mode 100644,100644
Binary files differ
diff --cc WebContent/VAADIN/themes/reindeer/button/img/button-sprites-ie6.png
index 8ccaa56edd0aeac98ac2c966ac25c6490b6ad1a4,8ccaa56edd0aeac98ac2c966ac25c6490b6ad1a4..0000000000000000000000000000000000000000
deleted file mode 100644,100644
Binary files differ
diff --cc WebContent/VAADIN/themes/reindeer/button/img/button-sprites.png
index 5087e8e9570f7941da89325e7e0388b43b4a6363,5087e8e9570f7941da89325e7e0388b43b4a6363..0000000000000000000000000000000000000000
deleted file mode 100644,100644
Binary files differ
diff --cc WebContent/VAADIN/themes/reindeer/common/img/black-vertical-sprites-ie6.png
index 84c52dbf4c09df07f12d2d951c9e4706c441941b,84c52dbf4c09df07f12d2d951c9e4706c441941b..0000000000000000000000000000000000000000
deleted file mode 100644,100644
Binary files differ
diff --cc WebContent/VAADIN/themes/reindeer/common/img/black-vertical-sprites.png
index 387abf2d4b142fdf28303144424bd25ad5996474,387abf2d4b142fdf28303144424bd25ad5996474..0000000000000000000000000000000000000000
deleted file mode 100644,100644
Binary files differ
diff --cc WebContent/VAADIN/themes/reindeer/common/img/horizontal-sprites.png
index 7980a5aa188df8bf69ab8399ea845792768fb4ac,7980a5aa188df8bf69ab8399ea845792768fb4ac..0000000000000000000000000000000000000000
deleted file mode 100644,100644
Binary files differ
diff --cc WebContent/VAADIN/themes/reindeer/common/img/vertical-sprites-ie6.png
index a7ace8b1317d8321e7fc2fd7742e0f7da978c6b5,a7ace8b1317d8321e7fc2fd7742e0f7da978c6b5..0000000000000000000000000000000000000000
deleted file mode 100644,100644
Binary files differ
diff --cc WebContent/VAADIN/themes/reindeer/common/img/vertical-sprites.png
index 31571144df05e6887530ebf0f92577d80c355047,31571144df05e6887530ebf0f92577d80c355047..0000000000000000000000000000000000000000
deleted file mode 100644,100644
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..192c404617732424e6960736e896daed46145f9c
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..418e951166235403442b3b89996a16fd2dba0ef5
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..bac6587c2017cf825c82000815ead71d556057f9
new file mode 100644 (file)
Binary files differ
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..92a2b582c5995dd15e472709e78e37d2209e56ca
new file mode 100644 (file)
Binary files differ
index f3e620353a9df2aa5f2d37f5c23a65400067c459,f3e620353a9df2aa5f2d37f5c23a65400067c459..e5e337725ef3fbeaf2f2a6c0f18ae3b4f5ae082f
  }
  .v-menubar-submenu .v-menubar-menuitem-selected .v-menubar-submenu-indicator {
        background-image: url(img/submenu-icon-hover.png);
--}
++}
++
++/* Checkboxes for checkable/checked menu items */
++.v-menubar-submenu-check-column .v-menubar-menuitem {
++      padding-left: 6px;
++}
++.v-menubar-submenu-check-column .v-menubar-menuitem-caption {
++      padding-left: 18px;
++}
++.v-menubar-submenu .v-menubar-menuitem-checked .v-menubar-menuitem-caption { 
++      background: transparent url(img/checked.png) no-repeat left;
++}
++.v-menubar-submenu .v-menubar-menuitem-unchecked .v-menubar-menuitem-caption {
++      background: transparent url(img/unchecked.png) no-repeat left;
++}
++.v-menubar-submenu .v-menubar-menuitem-selected-checked .v-menubar-menuitem-caption { 
++      background: transparent url(img/checked-selected.png) no-repeat left;
++}
++.v-menubar-submenu .v-menubar-menuitem-selected-unchecked .v-menubar-menuitem-caption {
++      background: transparent url(img/unchecked-selected.png) no-repeat left;
++}
index e00e03301770cd90e15afe1036b2118d2f4940c3,e00e03301770cd90e15afe1036b2118d2f4940c3..ad1744288af293de536e72330d60f2d2aff2a622
@@@ -24,7 -24,7 +24,7 @@@
        border: none;
        height: 20px;
        margin: 0;
--      padding: 3px 0 0 2px;
++      padding: 2px 0 1px 2px;
        font-size: 13px;
  }
  .v-filterselect-prompt .v-filterselect-input {
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f59714cc62b324cd103e7cde101ead34b330a33d
new file mode 100644 (file)
Binary files differ
diff --cc build/build.xml
index 928bfdc638c083c691babdadc823e718b03f03e4,66bac3d0daffe30c1f337edba835de67572d291e..ad90bc083b9d611c341f80497e0326761c350af9
                      <include name="VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/**/*" />
                      <include name="VAADIN/themes/base/**/*" />
                      <include name="VAADIN/themes/default/**/*" />
++                    <include name="VAADIN/themes/liferay/**/*" />
                      <include name="VAADIN/themes/runo/**/*" />
                      <include name="VAADIN/themes/reindeer/**/*" />
                  </patternset>
index d671dbc833d63c26579adf9c012b00160184b960,2b434224acfb9b7ea8542e0df578ce4e483c89d4..99de7a1352676198a68766dbafffce41bad33774
@@@ -471,6 -470,6 +471,9 @@@ public class HierarchicalContainer exte
              if (filteredChildren != null) {
                  filteredChildren = null;
              }
++            if (filteredParent != null) {
++                filteredParent = null;
++            }
          }
          enableAndFireContentsChangeEvents();
          return success;
                  if (c != null) {
                      c.remove(itemId);
  
++                    if (c.isEmpty()) {
++                        children.remove(parentItemId);
++                    }
++
                      // Found in the children list so might also be in the
                      // filteredChildren list
                      if (filteredChildren != null) {
                          LinkedList<Object> f = filteredChildren
                                  .get(parentItemId);
                          if (f != null) {
--                            f.remove(parentItemId);
++                            f.remove(itemId);
++                            if (f.isEmpty()) {
++                                filteredChildren.remove(parentItemId);
++                            }
                          }
                      }
                  }
              }
              parent.remove(itemId);
++            if (filteredParent != null) {
++                // Item id no longer has a parent as the item id is not in the
++                // container.
++                filteredParent.remove(itemId);
++            }
              noChildrenAllowed.remove(itemId);
          }
  
              // All filters removed
              filteredRoots = null;
              filteredChildren = null;
++            filteredParent = null;
  
              return super.doFilterContainer(hasFilters);
          }
index 5f808ea8cdecd0edf8560ab9314e212bc36be95e,b0cf4945f0255988831175312372221e951804fd..056428881fd12af74c70475f02eb422970d0ba03
@@@ -364,10 -356,7 +364,11 @@@ public class ApplicationConnection 
          // values currently only via transaction listener.
          String parameters = "repaintAll=1&" + "sh=" + screenHeight + "&sw="
                  + screenWidth + "&cw=" + clientWidth + "&ch=" + clientHeight
 -                + "&vw=" + offsetWidth + "&vh=" + offsetHeight + "&fr=" + token;
 +                + "&vw=" + offsetWidth + "&vh=" + offsetHeight + "&fr=" + token
 +                + "&tzo=" + tzOffset + "&rtzo=" + rtzOffset + "&dstd="
 +                + dstDiff + "&dston=" + dstInEffect + "&curdate=" + curDate
-                 + "&wsver=" + widgetsetVersion;
++                + "&wsver=" + widgetsetVersion
++                + (BrowserInfo.get().isTouchDevice() ? "&td=1" : "");
          return parameters;
      }
  
index 996b719e338c338d2aabb84278b1bee6327438d4,56b7d198e062952f8483f167a42d0d7e9aceb55e..4d43b7c34602f103d78ec3ccea3f09a6f6460edd
@@@ -8,6 -8,6 +8,7 @@@ import java.util.Iterator
  import java.util.List;
  import java.util.Stack;
  
++import com.google.gwt.core.client.GWT;
  import com.google.gwt.core.client.Scheduler;
  import com.google.gwt.core.client.Scheduler.ScheduledCommand;
  import com.google.gwt.dom.client.NodeList;
@@@ -64,8 -63,6 +65,10 @@@ public class VMenuBar extends SimpleFoc
      // associated
      protected static final Command emptyCommand = null;
  
 +    public static final String OPEN_ROOT_MENU_ON_HOWER = "ormoh";
 +
++    public static final String ATTRIBUTE_CHECKED = "checked";
++
      /** Widget fields **/
      protected boolean subMenu;
      protected ArrayList<CustomMenuItem> items;
              }
              itemHTML.append(moreItemText);
  
--            moreItem = new CustomMenuItem(itemHTML.toString(), emptyCommand);
-             collapsedRootItems = new VMenuBar(true, (VMenuBar) client
-                     .getPaintable(uidlId));
++            moreItem = GWT.create(CustomMenuItem.class);
++            moreItem.setHTML(itemHTML.toString());
++            moreItem.setCommand(emptyCommand);
++
+             collapsedRootItems = new VMenuBar(true,
+                     (VMenuBar) client.getPaintable(uidlId));
              moreItem.setSubMenu(collapsedRootItems);
              moreItem.addStyleName(CLASSNAME + "-more-menuitem");
          }
              UIDL item = (UIDL) itr.next();
              CustomMenuItem currentItem = null;
  
--            String itemText = item.getStringAttribute("text");
              final int itemId = item.getIntAttribute("id");
  
              boolean itemHasCommand = item.hasAttribute("command");
++            boolean itemIsCheckable = item.hasAttribute(ATTRIBUTE_CHECKED);
  
--            // Construct html from the text and the optional icon
--            StringBuffer itemHTML = new StringBuffer();
--            Command cmd = null;
--
--            if (item.hasAttribute("separator")) {
--                itemHTML.append("<span>---</span>");
--            } else {
--                // Add submenu indicator
--                if (item.getChildCount() > 0) {
--                    // FIXME For compatibility reasons: remove in version 7
--                    String bgStyle = "";
--                    if (submenuIcon != null) {
--                        bgStyle = " style=\"background-image: url("
--                                + submenuIcon
--                                + "); text-indent: -999px; width: 1em;\"";
--                    }
--                    itemHTML.append("<span class=\"" + CLASSNAME
--                            + "-submenu-indicator\"" + bgStyle
--                            + ">&#x25BA;</span>");
--                }
--
--                itemHTML.append("<span class=\"" + CLASSNAME
--                        + "-menuitem-caption\">");
--                if (item.hasAttribute("icon")) {
-                     itemHTML
-                             .append("<img src=\""
-                                     + client.translateVaadinUri(item
-                                             .getStringAttribute("icon"))
-                                     + "\" class=\"" + Icon.CLASSNAME
-                                     + "\" alt=\"\" />");
 -                    itemHTML.append("<img src=\""
 -                            + client.translateVaadinUri(item
 -                                    .getStringAttribute("icon"))
 -                            + "\" class=\"" + Icon.CLASSNAME + "\" alt=\"\" />");
--                }
--                itemHTML.append(Util.escapeHTML(itemText) + "</span>");
++            String itemHTML = buildItemHTML(item);
  
--                if (itemHasCommand) {
++            Command cmd = null;
++            if (!item.hasAttribute("separator")) {
++                if (itemHasCommand || itemIsCheckable) {
                      // Construct a command that fires onMenuClick(int) with the
                      // item's id-number
                      cmd = new Command() {
              }
  
              while (!itr.hasNext() && !iteratorStack.empty()) {
++                boolean hasCheckableItem = false;
++                for (CustomMenuItem menuItem : currentMenu.getItems()) {
++                    hasCheckableItem = hasCheckableItem
++                            || menuItem.isCheckable();
++                }
++                if (hasCheckableItem) {
++                    currentMenu.addStyleDependentName("check-column");
++                } else {
++                    currentMenu.removeStyleDependentName("check-column");
++                }
++
                  itr = iteratorStack.pop();
                  currentMenu = menuStack.pop();
              }
  
      }// updateFromUIDL
  
++    /**
++     * Build the HTML content for a menu item.
++     * 
++     * @param item
++     * @return
++     */
++    protected String buildItemHTML(UIDL item) {
++        // Construct html from the text and the optional icon
++        StringBuffer itemHTML = new StringBuffer();
++        if (item.hasAttribute("separator")) {
++            itemHTML.append("<span>---</span>");
++        } else {
++            // Add submenu indicator
++            if (item.getChildCount() > 0) {
++                // FIXME For compatibility reasons: remove in version 7
++                String bgStyle = "";
++                if (submenuIcon != null) {
++                    bgStyle = " style=\"background-image: url(" + submenuIcon
++                            + "); text-indent: -999px; width: 1em;\"";
++                }
++                itemHTML.append("<span class=\"" + CLASSNAME
++                        + "-submenu-indicator\"" + bgStyle + ">&#x25BA;</span>");
++            }
++
++            itemHTML.append("<span class=\"" + CLASSNAME
++                    + "-menuitem-caption\">");
++            if (item.hasAttribute("icon")) {
++                itemHTML.append("<img src=\""
++                        + client.translateVaadinUri(item
++                                .getStringAttribute("icon")) + "\" class=\""
++                        + Icon.CLASSNAME + "\" alt=\"\" />");
++            }
++            String itemText = item.getStringAttribute("text");
++            itemHTML.append(Util.escapeHTML(itemText));
++            itemHTML.append("</span>");
++        }
++        return itemHTML.toString();
++    }
++
      /**
       * This is called by the items in the menu and it communicates the
       * information to the server
       * @return the item created
       */
      public CustomMenuItem addItem(String html, Command cmd) {
--        CustomMenuItem item = new CustomMenuItem(html, cmd);
++        CustomMenuItem item = GWT.create(CustomMenuItem.class);
++        item.setHTML(html);
++        item.setCommand(cmd);
++
          addItem(item);
          return item;
      }
          protected VMenuBar parentMenu = null;
          protected boolean enabled = true;
          protected boolean isSeparator = false;
++        protected boolean checkable = false;
++        protected boolean checked = false;
++
++        /**
++         * Default menu item {@link Widget} constructor for GWT.create().
++         * 
++         * Use {@link #setHTML(String)} and {@link #setCommand(Command)} after
++         * constructing a menu item.
++         */
++        public CustomMenuItem() {
++            this("", null);
++        }
  
++        /**
++         * Creates a menu item {@link Widget}.
++         * 
++         * @param html
++         * @param cmd
++         * @deprecated use the default constructor and {@link #setHTML(String)}
++         *             and {@link #setCommand(Command)} instead
++         */
++        @Deprecated
          public CustomMenuItem(String html, Command cmd) {
              // We need spans to allow inline-block in IE
              setElement(DOM.createSpan());
              setStyleName(CLASSNAME + "-menuitem");
  
              sinkEvents(VTooltip.TOOLTIP_EVENTS);
--
--            // Sink the onload event for any icons. The onload
--            // events are handled by the parent VMenuBar.
--            Util.sinkOnloadForImages(getElement());
          }
  
          public void setSelected(boolean selected) {
              if (selected && !isSeparator) {
                  addStyleDependentName("selected");
++                // needed for IE6 to have a single style name to match for an
++                // element
++                if (checkable) {
++                    if (checked) {
++                        removeStyleDependentName("selected-unchecked");
++                        addStyleDependentName("selected-checked");
++                    } else {
++                        removeStyleDependentName("selected-checked");
++                        addStyleDependentName("selected-unchecked");
++                    }
++                }
              } else {
                  removeStyleDependentName("selected");
++                // needed for IE6 to have a single style name to match for an
++                // element
++                removeStyleDependentName("selected-checked");
++                removeStyleDependentName("selected-unchecked");
 +            }
 +        }
 +
++        public void setChecked(boolean checked) {
++            if (checkable && !isSeparator) {
++                this.checked = checked;
++
++                if (checked) {
++                    addStyleDependentName("checked");
++                    removeStyleDependentName("unchecked");
++                } else {
++                    addStyleDependentName("unchecked");
++                    removeStyleDependentName("checked");
++                }
++            } else {
++                this.checked = false;
++            }
++        }
++
++        public boolean isChecked() {
++            return checked;
++        }
++
++        public void setCheckable(boolean checkable) {
++            if (checkable && !isSeparator) {
++                this.checkable = true;
++            } else {
++                setChecked(false);
++                this.checkable = false;
+             }
+         }
++        public boolean isCheckable() {
++            return checkable;
++        }
++
          /*
           * setters and getters for the fields
           */
          public void setHTML(String html) {
              this.html = html;
              DOM.setInnerHTML(getElement(), html);
++
++            // Sink the onload event for any icons. The onload
++            // events are handled by the parent VMenuBar.
++            Util.sinkOnloadForImages(getElement());
          }
  
          public String getText() {
              setSeparator(uidl.hasAttribute("separator"));
              setEnabled(!uidl.hasAttribute("disabled"));
  
++            if (!isSeparator() && uidl.hasAttribute(ATTRIBUTE_CHECKED)) {
++                // if the selected attribute is present (either true or false),
++                // the item is selectable
++                setCheckable(true);
++                setChecked(uidl.getBooleanAttribute(ATTRIBUTE_CHECKED));
++            } else {
++                setCheckable(false);
++            }
++
              if (uidl.hasAttribute("style")) {
                  String itemStyle = uidl.getStringAttribute("style");
                  addStyleDependentName(itemStyle);
       * .dom.client.FocusEvent)
       */
      public void onFocus(FocusEvent event) {
-         // Focus the first element directly, so the keyboard focus becomes
-         // visible
-         setSelected(items.get(0));
++
      }
  
      private final String SUBPART_PREFIX = "item";
index aba7ccf2172406637fb9cd6f883b7dea51f4db21,9e4e167060c47bd2a76603ff8f81fa3a631f4d31..a277b4c42d2693fb8f8ffd8d813c4264edb60dc6
@@@ -22,7 -20,7 +22,7 @@@ import com.vaadin.terminal.gwt.client.U
   * temporary float over other components like context menus etc. This is to deal
   * stacking order correctly with VWindow objects.
   */
--public class VOverlay extends PopupPanel {
++public class VOverlay extends PopupPanel implements CloseHandler<PopupPanel> {
  
      /*
       * The z-index value from where all overlays live. This can be overridden in
  
      public VOverlay(boolean autoHide, boolean modal, boolean showShadow) {
          super(autoHide, modal);
--        if (showShadow) {
--            shadow = DOM.createDiv();
--            shadow.setClassName(CLASSNAME_SHADOW);
--            shadow.setInnerHTML(SHADOW_HTML);
--            DOM.setStyleAttribute(shadow, "position", "absolute");
--
--            addCloseHandler(new CloseHandler<PopupPanel>() {
--                public void onClose(CloseEvent<PopupPanel> event) {
--                    if (shadow.getParentElement() != null) {
--                        shadow.getParentElement().removeChild(shadow);
--                    }
--                }
--            });
--        }
++        setShadowEnabled(showShadow);
          adjustZIndex();
      }
  
++    /**
++     * Method to controle whether DOM elements for shadow are added. With this
++     * method subclasses can control displaying of shadow also after the
++     * constructor.
++     * 
++     * @param enabled
++     *            true if shadow should be displayed
++     */
++    protected void setShadowEnabled(boolean enabled) {
++        if (enabled != isShadowEnabled()) {
++            if (enabled) {
++                shadow = DOM.createDiv();
++                shadow.setClassName(CLASSNAME_SHADOW);
++                shadow.setInnerHTML(SHADOW_HTML);
++                DOM.setStyleAttribute(shadow, "position", "absolute");
++                addCloseHandler(this);
++            } else {
++                removeShadowIfPresent();
++                shadow = null;
++            }
++        }
++    }
++
++    protected boolean isShadowEnabled() {
++        return shadow != null;
++    }
++
++    private void removeShadowIfPresent() {
++        if (isShadowEnabled() && shadow.getParentElement() != null) {
++            shadow.getParentElement().removeChild(shadow);
++        }
++    }
++
      private void adjustZIndex() {
          setZIndex(Z_INDEX);
      }
       */
      protected void setZIndex(int zIndex) {
          DOM.setStyleAttribute(getElement(), "zIndex", "" + zIndex);
--        if (shadow != null) {
++        if (isShadowEnabled()) {
              DOM.setStyleAttribute(shadow, "zIndex", "" + zIndex);
          }
      }
  
      @Override
      public void setPopupPosition(int left, int top) {
 +        // TODO, this should in fact be part of
 +        // Document.get().getBodyOffsetLeft/Top(). Would require overriding DOM
 +        // for all permutations. Now adding fix as margin instead of fixing
 +        // left/top because parent class saves the position.
 +        Style style = getElement().getStyle();
 +        style.setMarginLeft(-adjustByRelativeLeftBodyMargin(), Unit.PX);
 +        style.setMarginTop(-adjustByRelativeTopBodyMargin(), Unit.PX);
          super.setPopupPosition(left, top);
--        if (shadow != null) {
--            updateShadowSizeAndPosition(isAnimationEnabled() ? 0 : 1);
-         }
++        updateShadowSizeAndPosition(isAnimationEnabled() ? 0 : 1);
 +    }
 +
 +    private static int adjustByRelativeTopBodyMargin() {
 +        if (topFix == -1) {
-             topFix = detectRelativeBodyFixes("top");
++            boolean ie6OrIe7 = BrowserInfo.get().isIE()
++                    && BrowserInfo.get().getIEVersion() <= 7;
++            topFix = detectRelativeBodyFixes("top", ie6OrIe7);
          }
-     private native static int detectRelativeBodyFixes(String axis)
 +        return topFix;
 +    }
 +
-                 return b.getBoundingClientRect()[axis];
++    private native static int detectRelativeBodyFixes(String axis,
++            boolean removeClientLeftOrTop)
 +    /*-{
 +        try {
 +            var b = $wnd.document.body;
 +            var cstyle = b.currentStyle ? b.currentStyle : getComputedStyle(b);
 +            if(cstyle && cstyle.position == 'relative') {
-             leftFix = detectRelativeBodyFixes("left");
++                var offset = b.getBoundingClientRect()[axis];
++                if (removeClientLeftOrTop) {
++                    // IE6 and IE7 include the top left border of the client area into the boundingClientRect
++                    var clientTopOrLeft = 0;
++                    if (axis == "top")
++                        clientTopOrLeft = $wnd.document.documentElement.clientTop;
++                    else
++                        clientTopOrLeft = $wnd.document.documentElement.clientLeft;
++
++                    offset -= clientTopOrLeft;
++                }
++                return offset;
 +            }
 +        } catch(e){}
 +        return 0;
 +    }-*/;
 +
 +    private static int adjustByRelativeLeftBodyMargin() {
 +        if (leftFix == -1) {
++            boolean ie6OrIe7 = BrowserInfo.get().isIE()
++                    && BrowserInfo.get().getIEVersion() <= 7;
++            leftFix = detectRelativeBodyFixes("left", ie6OrIe7);
++
 +        }
 +        return leftFix;
      }
  
      @Override
      public void show() {
          super.show();
--        if (shadow != null) {
++        if (isShadowEnabled()) {
              if (isAnimationEnabled()) {
                  ShadowAnimation sa = new ShadowAnimation();
                  sa.run(200);
          Util.runIE7ZeroSizedBodyFix();
      }
  
++    @Override
++    protected void onDetach() {
++        super.onDetach();
++
++        // Always ensure shadow is removed when the overlay is removed.
++        removeShadowIfPresent();
++    }
++
      @Override
      public void setVisible(boolean visible) {
          super.setVisible(visible);
--        if (shadow != null) {
++        if (isShadowEnabled()) {
              shadow.getStyle().setProperty("visibility",
                      visible ? "visible" : "hidden");
          }
      @Override
      public void setWidth(String width) {
          super.setWidth(width);
--        if (shadow != null) {
--            updateShadowSizeAndPosition(1.0);
--        }
++        updateShadowSizeAndPosition(1.0);
      }
  
      @Override
      public void setHeight(String height) {
          super.setHeight(height);
--        if (shadow != null) {
--            updateShadowSizeAndPosition(1.0);
--        }
++        updateShadowSizeAndPosition(1.0);
      }
  
      /**
       *            name=='v-shadow-foobar'.
       */
      protected void setShadowStyle(String style) {
--        if (shadow != null) {
++        if (isShadowEnabled()) {
              shadow.setClassName(CLASSNAME_SHADOW + "-" + style);
          }
      }
       */
      private void updateShadowSizeAndPosition(final double progress) {
          // Don't do anything if overlay element is not attached
--        if (!isAttached()) {
++        if (!isAttached() || shadow == null) {
              return;
          }
          // Calculate proper z-index
      protected class ShadowAnimation extends Animation {
          @Override
          protected void onUpdate(double progress) {
--            if (shadow != null) {
--                updateShadowSizeAndPosition(progress);
--            }
++            updateShadowSizeAndPosition(progress);
          }
      }
++
++    public void onClose(CloseEvent<PopupPanel> event) {
++        removeShadowIfPresent();
++    }
  }
index c1d674a367bb0f429603fb5af660215a97bc0ece,0f755c67378b711d220d2da53e274363a0dacc56..d36c2137d81bb402ead48ba2ea3a39c2b2b51148
@@@ -835,15 -766,8 +835,19 @@@ public class VScrollTable extends FlowP
          tabIndex = uidl.hasAttribute("tabindex") ? uidl
                  .getIntAttribute("tabindex") : 0;
  
 -        multiselectmode = uidl.hasAttribute("multiselectmode") ? uidl
 -                .getIntAttribute("multiselectmode") : MULTISELECT_MODE_DEFAULT;
 +        if (!BrowserInfo.get().isTouchDevice()) {
 +            multiselectmode = uidl.hasAttribute("multiselectmode") ? uidl
 +                    .getIntAttribute("multiselectmode")
 +                    : MULTISELECT_MODE_DEFAULT;
 +        }
 +
 +        if (uidl.hasAttribute("alb")) {
 +            bodyActionKeys = uidl.getStringArrayAttribute("alb");
++        } else {
++            // Need to clear the actions if the action handlers have been
++            // removed
++            bodyActionKeys = null;
 +        }
  
          setCacheRate(uidl.hasAttribute("cr") ? uidl.getDoubleAttribute("cr")
                  : CACHE_RATE_DEFAULT);
index 3df2e356d15204cc3305f9337fc93d4f5c04275f,e275d7a9ac2123f37910189c8e53a4b3679edcd5..a05cef3984e49be18e576cafc5a37f82d9d24af8
@@@ -12,6 -12,6 +12,9 @@@ import com.google.gwt.event.dom.client.
  import com.google.gwt.event.dom.client.ChangeHandler;
  import com.google.gwt.event.dom.client.FocusEvent;
  import com.google.gwt.event.dom.client.FocusHandler;
++import com.google.gwt.event.dom.client.KeyCodes;
++import com.google.gwt.event.dom.client.KeyDownEvent;
++import com.google.gwt.event.dom.client.KeyDownHandler;
  import com.google.gwt.user.client.Command;
  import com.google.gwt.user.client.DOM;
  import com.google.gwt.user.client.Element;
@@@ -35,7 -34,7 +37,8 @@@ import com.vaadin.terminal.gwt.client.u
   * 
   */
  public class VTextField extends TextBoxBase implements Paintable, Field,
--        ChangeHandler, FocusHandler, BlurHandler, BeforeShortcutActionListener {
++        ChangeHandler, FocusHandler, BlurHandler, BeforeShortcutActionListener,
++        KeyDownHandler {
  
      public static final String VAR_CUR_TEXT = "curText";
      /**
          }
          setStyleName(CLASSNAME);
          addChangeHandler(this);
++        if (BrowserInfo.get().isIE()) {
++            // IE does not send change events when pressing enter in a text
++            // input so we handle it using a key listener instead
++            addKeyDownHandler(this);
++        }
          addFocusHandler(this);
          addBlurHandler(this);
          sinkEvents(VTooltip.TOOLTIP_EVENTS);
          }
          wordwrap = enabled;
      }
++
++    public void onKeyDown(KeyDownEvent event) {
++        if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
++            valueChange(false);
++        }
++    }
  }
index 98ebf73b77967c21705c819de228bdbd8f1e97b4,67d90d356423ac0bffc405f40b18ca88a4fc4073..e2fe47cc2c270eff0320ecde44208eb691386c4d
@@@ -11,9 -11,9 +11,10 @@@ import java.util.Iterator
  import java.util.Set;
  
  import com.google.gwt.core.client.Scheduler;
 +import com.google.gwt.core.client.Scheduler.ScheduledCommand;
  import com.google.gwt.event.dom.client.BlurEvent;
  import com.google.gwt.event.dom.client.BlurHandler;
+ import com.google.gwt.event.dom.client.DomEvent.Type;
  import com.google.gwt.event.dom.client.FocusEvent;
  import com.google.gwt.event.dom.client.FocusHandler;
  import com.google.gwt.event.dom.client.KeyDownEvent;
@@@ -310,14 -292,8 +308,14 @@@ public class VWindow extends VOverlay i
              if (uidl.getBooleanAttribute("resizable") != resizable) {
                  setResizable(!resizable);
              }
 +            resizeLazy = uidl.hasAttribute(VView.RESIZE_LAZY);
  
              setDraggable(!uidl.hasAttribute("fixedposition"));
-         }
 +
-         if (uidl.hasAttribute("caption")) {
-             setCaption(uidl.getStringAttribute("caption"), uidl
-                     .getStringAttribute("icon"));
++            // Caption must be set before required header size is measured. If
++            // the caption attribute is missing the caption should be cleared.
++            setCaption(uidl.getStringAttribute("caption"),
++                    uidl.getStringAttribute("icon"));
          }
  
          visibilityChangesDisabled = true;
  
      private void showModalityCurtain() {
          if (BrowserInfo.get().isFF2()) {
-             DOM.setStyleAttribute(getModalityCurtain(), "height", DOM
-                     .getElementPropertyInt(RootPanel.getBodyElement(),
-                             "offsetHeight")
-                     + "px");
+             DOM.setStyleAttribute(
 -                    modalityCurtain,
++                    getModalityCurtain(),
+                     "height",
+                     DOM.getElementPropertyInt(RootPanel.getBodyElement(),
+                             "offsetHeight") + "px");
 -            DOM.setStyleAttribute(modalityCurtain, "position", "absolute");
 +            DOM.setStyleAttribute(getModalityCurtain(), "position", "absolute");
          }
-         DOM.setStyleAttribute(getModalityCurtain(), "zIndex", ""
-                 + (windowOrder.indexOf(this) + Z_INDEX));
 -        DOM.setStyleAttribute(modalityCurtain, "zIndex",
++        DOM.setStyleAttribute(getModalityCurtain(), "zIndex",
+                 "" + (windowOrder.indexOf(this) + Z_INDEX));
          if (isShowing()) {
 -            RootPanel.getBodyElement().insertBefore(modalityCurtain,
 +            RootPanel.getBodyElement().insertBefore(getModalityCurtain(),
                      getElement());
          } else {
 -            DOM.appendChild(RootPanel.getBodyElement(), modalityCurtain);
 +            DOM.appendChild(RootPanel.getBodyElement(), getModalityCurtain());
          }
      }
  
index cb4ba16f65553e9c92a19532d2a4ad30cfe35f25,e64cd6f2435b5ab32cadbc7e36666fbb73f7c848..b4f194c7f7a0499e0167dd9329194dcfd3eaa0ad
@@@ -561,15 -542,10 +561,19 @@@ public abstract class AbstractApplicati
      private void updateBrowserProperties(WebBrowser browser,
              PortletRequest request) {
          String userAgent = getHTTPHeader(request, "user-agent");
--        browser.updateBrowserProperties(request.getLocale(), null,
--                request.isSecure(), userAgent,
--                getHTTPRequestParameter(request, "sw"),
-                 getHTTPRequestParameter(request, "sh"),
-                 getHTTPRequestParameter(request, "tzo"),
-                 getHTTPRequestParameter(request, "rtzo"),
-                 getHTTPRequestParameter(request, "dstd"),
-                 getHTTPRequestParameter(request, "dstActive"),
-                 getHTTPRequestParameter(request, "curdate"));
 -                getHTTPRequestParameter(request, "sh"));
++        browser.updateRequestDetails(request.getLocale(), null,
++                request.isSecure(), userAgent);
++        if (getHTTPRequestParameter(request, "repaintAll") != null) {
++            browser.updateClientSideDetails(
++                    getHTTPRequestParameter(request, "sw"),
++                    getHTTPRequestParameter(request, "sh"),
++                    getHTTPRequestParameter(request, "tzo"),
++                    getHTTPRequestParameter(request, "rtzo"),
++                    getHTTPRequestParameter(request, "dstd"),
++                    getHTTPRequestParameter(request, "dstActive"),
++                    getHTTPRequestParameter(request, "curdate"),
++                    getHTTPRequestParameter(request, "td") != null);
++        }
      }
  
      @Override
index f274a474dd62c9f3b01f00541650f7d0c0d9b544,d6b6c840db85689ec625c9ca63e04f4093f98218..c394e8ae6a867ad1abec796a46bf479eb95c0cb2
@@@ -589,12 -571,10 +589,18 @@@ public abstract class AbstractApplicati
  
      private void updateBrowserProperties(WebBrowser browser,
              HttpServletRequest request) {
--        browser.updateBrowserProperties(request.getLocale(),
++        // request based details updated always
++        browser.updateRequestDetails(request.getLocale(),
                  request.getRemoteAddr(), request.isSecure(),
--                request.getHeader("user-agent"), request.getParameter("sw"),
-                 request.getParameter("sh"), request.getParameter("tzo"),
-                 request.getParameter("rtzo"), request.getParameter("dstd"),
-                 request.getParameter("dston"), request.getParameter("curdate"));
 -                request.getParameter("sh"));
++                request.getHeader("user-agent"));
++        if (request.getParameter("repaintAll") != null) {
++            browser.updateClientSideDetails(request.getParameter("sw"),
++                    request.getParameter("sh"), request.getParameter("tzo"),
++                    request.getParameter("rtzo"), request.getParameter("dstd"),
++                    request.getParameter("dston"),
++                    request.getParameter("curdate"),
++                    request.getParameter("td") != null);
++        }
      }
  
      protected ClassLoader getClassLoader() throws ServletException {
index 152fa81bb5bb7224863bb9ea36ae9defe19912a6,152fa81bb5bb7224863bb9ea36ae9defe19912a6..74b7a27a9652aff3126d6b462f746820724b6430
@@@ -392,6 -392,6 +392,7 @@@ public abstract class AbstractCommunica
          int contentLength = request.getContentLength();
  
          boolean atStart = false;
++        boolean firstFileFieldFound = false;
  
          String rawfilename = "unknown";
          String rawMimeType = "application/octet-stream";
                  rawfilename = rawfilename.substring(1);
                  rawfilename = rawfilename.substring(0,
                          rawfilename.indexOf(parenthesis));
--            } else if (readLine.equals("")) {
++                firstFileFieldFound = true;
++            } else if (firstFileFieldFound && readLine.equals("")) {
                  atStart = true;
              } else if (readLine.startsWith("Content-Type")) {
                  rawMimeType = readLine.split(": ")[1];
index 1b0d7fe9867fc5e2f4f8997d89f6f078dc4ff01f,1d6881a836c99c616053d93c5898c5f428478798..4835b3c55b42edfad9830f10941eda20b2e256ce
@@@ -26,13 -25,8 +26,14 @@@ public class WebBrowser implements Term
      private Locale locale;
      private String address;
      private boolean secureConnection;
-     private Date currentDate;
 +    private int timezoneOffset = 0;
 +    private int rawTimezoneOffset = 0;
 +    private int dstSavings;
 +    private boolean dstInEffect;
++    private boolean touchDevice;
  
      private VBrowserDetails browserDetails;
++    private long clientServerTimeDelta;
  
      /**
       * There is no default-theme for this terminal type.
          return browserApplication;
      }
  
--    /**
--     * For internal use by AbstractApplicationServlet/AbstractApplicationPortlet
--     * only. Updates all properties in the class according to the given
--     * information.
--     * 
--     * @param locale
--     *            The browser primary locale
--     * @param address
--     *            The browser ip address
--     * @param secureConnection
--     *            true if using an https connection
--     * @param agent
--     *            Raw userAgent string from the browser
--     * @param sw
--     *            Screen width
--     * @param sh
--     *            Screen height
-      * @param tzo
-      *            TimeZone offset in minutes from GMT
-      * @param rtzo
-      *            raw TimeZone offset in minutes from GMT (w/o DST adjustment)
-      * @param dstSavings
-      *            the difference between the raw TimeZone and DST in minutes
-      * @param dstInEffect
-      *            is DST currently active in the region or not?
-      * @param curDate
-      *            the current date in milliseconds since the epoch
--     */
--    void updateBrowserProperties(Locale locale, String address,
-             boolean secureConnection, String agent, String sw, String sh,
-             String tzo, String rtzo, String dstSavings, String dstInEffect,
-             String curDate) {
 -            boolean secureConnection, String agent, String sw, String sh) {
--        this.locale = locale;
--        this.address = address;
--        this.secureConnection = secureConnection;
--        if (agent != null) {
--            browserApplication = agent;
--            browserDetails = new VBrowserDetails(agent);
--        }
--
--        if (sw != null) {
--            try {
--                screenHeight = Integer.parseInt(sh);
--                screenWidth = Integer.parseInt(sw);
--            } catch (final NumberFormatException e) {
--                screenHeight = screenWidth = 0;
-             }
-         }
-         if (tzo != null) {
-             try {
-                 // browser->java conversion: min->ms, reverse sign
-                 timezoneOffset = -Integer.parseInt(tzo) * 60 * 1000;
-             } catch (final NumberFormatException e) {
-                 timezoneOffset = 0; // default gmt+0
-             }
-         }
-         if (rtzo != null) {
-             try {
-                 // browser->java conversion: min->ms, reverse sign
-                 rawTimezoneOffset = -Integer.parseInt(rtzo) * 60 * 1000;
-             } catch (final NumberFormatException e) {
-                 rawTimezoneOffset = 0; // default gmt+0
-             }
-         }
-         if (dstSavings != null) {
-             try {
-                 // browser->java conversion: min->ms
-                 this.dstSavings = Integer.parseInt(dstSavings) * 60 * 1000;
-             } catch (final NumberFormatException e) {
-                 this.dstSavings = 0; // default no savings
-             }
-         }
-         if (dstInEffect != null) {
-             this.dstInEffect = Boolean.parseBoolean(dstInEffect);
-         }
-         if (curDate != null) {
-             try {
-                 long curTime = Long.parseLong(curDate);
-                 currentDate = new Date(curTime);
-             } catch (final NumberFormatException e) {
-                 currentDate = new Date();
--            }
--        }
--    }
--
      /**
       * Gets the IP-address of the web browser. If the application is running
       * inside a portlet, this method will return null.
          return browserDetails.isWindows();
      }
  
-      * close-enough value for most cases.
 +    /**
 +     * Returns the browser-reported TimeZone offset in milliseconds from GMT.
 +     * This includes possible daylight saving adjustments, to figure out which
 +     * TimeZone the user actually might be in, see
 +     * {@link #getRawTimezoneOffset()}.
 +     * 
 +     * @see WebBrowser#getRawTimezoneOffset()
 +     * @return timezone offset in milliseconds, 0 if not available
 +     */
 +    public Integer getTimezoneOffset() {
 +        return timezoneOffset;
 +    }
 +
 +    /**
 +     * Returns the browser-reported TimeZone offset in milliseconds from GMT
 +     * ignoring possible daylight saving adjustments that may be in effect in
 +     * the browser.
 +     * <p>
 +     * You can use this to figure out which TimeZones the user could actually be
 +     * in by calling {@link TimeZone#getAvailableIDs(int)}.
 +     * </p>
 +     * <p>
 +     * If {@link #getRawTimezoneOffset()} and {@link #getTimezoneOffset()}
 +     * returns the same value, the browser is either in a zone that does not
 +     * currently have daylight saving time, or in a zone that never has daylight
 +     * saving time.
 +     * </p>
 +     * 
 +     * @return timezone offset in milliseconds excluding DST, 0 if not available
 +     */
 +    public Integer getRawTimezoneOffset() {
 +        return rawTimezoneOffset;
 +    }
 +
 +    /**
 +     * Gets the difference in minutes between the browser's GMT TimeZone and
 +     * DST.
 +     * 
 +     * @return the amount of minutes that the TimeZone shifts when DST is in
 +     *         effect
 +     */
 +    public int getDSTSavings() {
 +        return dstSavings;
 +    }
 +
 +    /**
 +     * Determines whether daylight savings time (DST) is currently in effect in
 +     * the region of the browser or not.
 +     * 
 +     * @return true if the browser resides at a location that currently is in
 +     *         DST
 +     */
 +    public boolean isDSTInEffect() {
 +        return dstInEffect;
 +    }
 +
 +    /**
 +     * Returns the current date and time of the browser. This will not be
 +     * entirely accurate due to varying network latencies, but should provide a
-         return currentDate;
++     * close-enough value for most cases. Also note that the returned Date
++     * object uses servers default time zone, not the clients.
 +     * 
 +     * @return the current date and time of the browser.
++     * @see #isDSTInEffect()
++     * @see #getDSTSavings()
++     * @see #getTimezoneOffset()
 +     */
 +    public Date getCurrentDate() {
++        return new Date(new Date().getTime() + clientServerTimeDelta);
++    }
++
++    /**
++     * @return true if the browser is detected to support touch events
++     */
++    public boolean isTouchDevice() {
++        return touchDevice;
++    }
++
++    /**
++     * For internal use by AbstractApplicationServlet/AbstractApplicationPortlet
++     * only. Updates all properties in the class according to the given
++     * information.
++     * 
++     * @param sw
++     *            Screen width
++     * @param sh
++     *            Screen height
++     * @param tzo
++     *            TimeZone offset in minutes from GMT
++     * @param rtzo
++     *            raw TimeZone offset in minutes from GMT (w/o DST adjustment)
++     * @param dstSavings
++     *            the difference between the raw TimeZone and DST in minutes
++     * @param dstInEffect
++     *            is DST currently active in the region or not?
++     * @param curDate
++     *            the current date in milliseconds since the epoch
++     * @param touchDevice
++     */
++    void updateClientSideDetails(String sw, String sh, String tzo, String rtzo,
++            String dstSavings, String dstInEffect, String curDate,
++            boolean touchDevice) {
++        if (sw != null) {
++            try {
++                screenHeight = Integer.parseInt(sh);
++                screenWidth = Integer.parseInt(sw);
++            } catch (final NumberFormatException e) {
++                screenHeight = screenWidth = 0;
++            }
++        }
++        if (tzo != null) {
++            try {
++                // browser->java conversion: min->ms, reverse sign
++                timezoneOffset = -Integer.parseInt(tzo) * 60 * 1000;
++            } catch (final NumberFormatException e) {
++                timezoneOffset = 0; // default gmt+0
++            }
++        }
++        if (rtzo != null) {
++            try {
++                // browser->java conversion: min->ms, reverse sign
++                rawTimezoneOffset = -Integer.parseInt(rtzo) * 60 * 1000;
++            } catch (final NumberFormatException e) {
++                rawTimezoneOffset = 0; // default gmt+0
++            }
++        }
++        if (dstSavings != null) {
++            try {
++                // browser->java conversion: min->ms
++                this.dstSavings = Integer.parseInt(dstSavings) * 60 * 1000;
++            } catch (final NumberFormatException e) {
++                this.dstSavings = 0; // default no savings
++            }
++        }
++        if (dstInEffect != null) {
++            this.dstInEffect = Boolean.parseBoolean(dstInEffect);
++        }
++        if (curDate != null) {
++            try {
++                long curTime = Long.parseLong(curDate);
++                clientServerTimeDelta = curTime - new Date().getTime();
++            } catch (final NumberFormatException e) {
++                clientServerTimeDelta = 0;
++            }
++        }
++        this.touchDevice = touchDevice;
++
++    }
++
++    /**
++     * For internal use by AbstractApplicationServlet/AbstractApplicationPortlet
++     * only. Updates all properties in the class according to the given
++     * information.
++     * 
++     * @param locale
++     *            The browser primary locale
++     * @param address
++     *            The browser ip address
++     * @param secureConnection
++     *            true if using an https connection
++     * @param agent
++     *            Raw userAgent string from the browser
++     */
++    void updateRequestDetails(Locale locale, String address,
++            boolean secureConnection, String agent) {
++        this.locale = locale;
++        this.address = address;
++        this.secureConnection = secureConnection;
++        if (agent != null) {
++            browserApplication = agent;
++            browserDetails = new VBrowserDetails(agent);
++        }
++
 +    }
 +
  }
index 8dfbe07b18b5352ec4bc4df5d21d19eb7885379f,8dfbe07b18b5352ec4bc4df5d21d19eb7885379f..0b0fff2a3463649081b95f73d16ff2fd013cee80
@@@ -23,7 -23,7 +23,7 @@@ public abstract class AbstractOrderedLa
  
      private static final String CLICK_EVENT = EventId.LAYOUT_CLICK;
  
--    private static final Alignment ALIGNMENT_DEFAULT = Alignment.TOP_LEFT;
++    public static final Alignment ALIGNMENT_DEFAULT = Alignment.TOP_LEFT;
  
      /**
       * Custom layout slots containing the components.
index c64cd386ce687480efdb050402c0cab70e7ffb6a,cf354750a8f98a042e264cdb1d22c66ed265c226..122d155e0f091dc249d6836d1f24679d4aa07adc
@@@ -176,15 -175,13 +176,29 @@@ public class Button extends AbstractFie
                  if (newValue != null && !newValue.equals(oldValue)
                          && !isReadOnly()) {
                      setValue(newValue);
-                     fireClick(MouseEventDetails.deSerialize((String) variables
-                             .get("mousedetails")));
 -                    fireClick();
++                    if (variables.containsKey("mousedetails")) {
++                        fireClick(MouseEventDetails
++                                .deSerialize((String) variables
++                                        .get("mousedetails")));
++                    } else {
++                        // for compatibility with custom implementations which
++                        // don't send mouse details
++                        fireClick();
++                    }
                  }
              } else {
  
                  // Only send click event if the button is pushed
                  if (newValue.booleanValue()) {
-                     fireClick(MouseEventDetails.deSerialize((String) variables
-                             .get("mousedetails")));
 -                    fireClick();
++                    if (variables.containsKey("mousedetails")) {
++                        fireClick(MouseEventDetails
++                                .deSerialize((String) variables
++                                        .get("mousedetails")));
++                    } else {
++                        // for compatibility with custom implementations which
++                        // don't send mouse details
++                        fireClick();
++                    }
                  }
  
                  // If the button is true for some reason, release it
       */
      public class ClickEvent extends Component.Event {
  
-         private MouseEventDetails details;
++        private final MouseEventDetails details;
 +
          /**
           * New instance of text change event.
           * 
           */
          public ClickEvent(Component source) {
              super(source);
++            details = null;
 +        }
 +
 +        /**
 +         * Constructor with mouse details
 +         * 
 +         * @param source
 +         *            The source where the click took place
 +         * @param details
 +         *            Details about the mouse click
 +         */
 +        public ClickEvent(Component source, MouseEventDetails details) {
 +            super(source);
 +            this.details = details;
          }
  
          /**
          public Button getButton() {
              return (Button) getSource();
          }
-          * @return The mouse cursor x position
 +
 +        /**
 +         * Returns the mouse position (x coordinate) when the click took place.
 +         * The position is relative to the browser client area.
 +         * 
-             return details.getClientX();
++         * @return The mouse cursor x position or -1 if unknown
 +         */
 +        public int getClientX() {
-          * @return The mouse cursor y position
++            if (null != details) {
++                return details.getClientX();
++            } else {
++                return -1;
++            }
 +        }
 +
 +        /**
 +         * Returns the mouse position (y coordinate) when the click took place.
 +         * The position is relative to the browser client area.
 +         * 
-             return details.getClientY();
++         * @return The mouse cursor y position or -1 if unknown
 +         */
 +        public int getClientY() {
-             return details.getRelativeX();
++            if (null != details) {
++                return details.getClientY();
++            } else {
++                return -1;
++            }
 +        }
 +
 +        /**
 +         * Returns the relative mouse position (x coordinate) when the click
 +         * took place. The position is relative to the clicked component.
 +         * 
 +         * @return The mouse cursor x position relative to the clicked layout
 +         *         component or -1 if no x coordinate available
 +         */
 +        public int getRelativeX() {
-             return details.getRelativeY();
++            if (null != details) {
++                return details.getRelativeX();
++            } else {
++                return -1;
++            }
 +        }
 +
 +        /**
 +         * Returns the relative mouse position (y coordinate) when the click
 +         * took place. The position is relative to the clicked component.
 +         * 
 +         * @return The mouse cursor y position relative to the clicked layout
 +         *         component or -1 if no y coordinate available
 +         */
 +        public int getRelativeY() {
-             return details.isAltKey();
++            if (null != details) {
++                return details.getRelativeY();
++            } else {
++                return -1;
++            }
 +        }
 +
 +        /**
 +         * Checks if the Alt key was down when the mouse event took place.
 +         * 
 +         * @return true if Alt was down when the event occured, false otherwise
++         *         or if unknown
 +         */
 +        public boolean isAltKey() {
-          *         otherwise
++            if (null != details) {
++                return details.isAltKey();
++            } else {
++                return false;
++            }
 +        }
 +
 +        /**
 +         * Checks if the Ctrl key was down when the mouse event took place.
 +         * 
 +         * @return true if Ctrl was pressed when the event occured, false
-             return details.isCtrlKey();
++         *         otherwise or if unknown
 +         */
 +        public boolean isCtrlKey() {
-          *         otherwise
++            if (null != details) {
++                return details.isCtrlKey();
++            } else {
++                return false;
++            }
 +        }
 +
 +        /**
 +         * Checks if the Meta key was down when the mouse event took place.
 +         * 
 +         * @return true if Meta was pressed when the event occured, false
-             return details.isMetaKey();
++         *         otherwise or if unknown
 +         */
 +        public boolean isMetaKey() {
-          *         otherwise
++            if (null != details) {
++                return details.isMetaKey();
++            } else {
++                return false;
++            }
 +        }
 +
 +        /**
 +         * Checks if the Shift key was down when the mouse event took place.
 +         * 
 +         * @return true if Shift was pressed when the event occured, false
-             return details.isShiftKey();
++         *         otherwise or if unknown
 +         */
 +        public boolean isShiftKey() {
++            if (null != details) {
++                return details.isShiftKey();
++            } else {
++                return false;
++            }
 +        }
      }
  
      /**
      }
  
      /**
--     * Emits the options change event.
++     * Fires a click event to all listeners without any event details.
++     * 
++     * In subclasses, override {@link #fireClick(MouseEventDetails)} instead of
++     * this method.
       */
      protected void fireClick() {
          fireEvent(new Button.ClickEvent(this));
      }
  
-     private void fireClick(MouseEventDetails details) {
++    /**
++     * Fires a click event to all listeners.
++     * 
++     * @param details
++     *            MouseEventDetails from which keyboard modifiers and other
++     *            information about the mouse click can be obtained. If the
++     *            button was clicked by a keyboard event, some of the fields may
++     *            be empty/undefined.
++     */
++    protected void fireClick(MouseEventDetails details) {
 +        fireEvent(new Button.ClickEvent(this, details));
 +    }
 +
      @Override
      protected void setInternalValue(Object newValue) {
          // Make sure only booleans get through
index d79e070fca5801a15e009225d522c0e2b8a9c139,b7da82675e0d0dcefcfbc71f060f4c05c44f237f..f8fbf917123fbfb0b11c9632088eb21f0c8939f0
@@@ -123,7 -119,7 +123,12 @@@ public class MenuBar extends AbstractCo
              if (description != null && description.length() > 0) {
                  target.addAttribute("description", description);
              }
--
++            if (item.isCheckable()) {
++                // if the "checked" attribute is present (either true or false),
++                // the item is checkable
++                target.addAttribute(VMenuBar.ATTRIBUTE_CHECKED,
++                        item.isChecked());
++            }
              if (item.hasChildren()) {
                  for (MenuItem child : item.getChildren()) {
                      paintItem(target, child);
  
              // If we got the clicked item, launch the command.
              if (found && tmpItem.isEnabled()) {
--                tmpItem.getCommand().menuSelected(tmpItem);
++                if (tmpItem.isCheckable()) {
++                    tmpItem.setChecked(!tmpItem.isChecked());
++                }
++                if (null != tmpItem.getCommand()) {
++                    tmpItem.getCommand().menuSelected(tmpItem);
++                }
              }
          }// if
      }// changeVariables
          private boolean isSeparator = false;
          private String styleName;
          private String description;
++        private boolean checkable = false;
++        private boolean checked = false;
  
          /**
           * Constructs a new menu item that can optionally have an icon and a
           *            the icon for the menu item
           * @param command
           *            the command for the menu item
++         * @throws IllegalStateException
++         *             If the item is checkable and thus cannot have children.
           */
          public MenuBar.MenuItem addItem(String caption, Resource icon,
--                MenuBar.Command command) {
++                MenuBar.Command command) throws IllegalStateException {
              if (isSeparator()) {
                  throw new UnsupportedOperationException(
                          "Cannot add items to a separator");
              }
++            if (isCheckable()) {
++                throw new IllegalStateException(
++                        "A checkable item cannot have children");
++            }
              if (caption == null) {
                  throw new IllegalArgumentException("Caption cannot be null");
              }
           *            the command for the menu item
           * @param itemToAddBefore
           *            the item that will be after the new item
--         * 
++         * @throws IllegalStateException
++         *             If the item is checkable and thus cannot have children.
           */
          public MenuBar.MenuItem addItemBefore(String caption, Resource icon,
--                MenuBar.Command command, MenuBar.MenuItem itemToAddBefore) {
--
++                MenuBar.Command command, MenuBar.MenuItem itemToAddBefore)
++                throws IllegalStateException {
++            if (isCheckable()) {
++                throw new IllegalStateException(
++                        "A checkable item cannot have children");
++            }
              MenuItem newItem = null;
  
              if (hasChildren() && itsChildren.contains(itemToAddBefore)) {
              return description;
          }
  
++        /**
++         * Gets the checkable state of the item - whether the item has checked
++         * and unchecked states. If an item is checkable its checked state (as
++         * returned by {@link #isChecked()}) is indicated in the UI.
++         * 
++         * <p>
++         * An item is not checkable by default.
++         * </p>
++         * 
++         * @return true if the item is checkable, false otherwise
++         * @since 6.6.2
++         */
++        public boolean isCheckable() {
++            return checkable;
++        }
++
++        /**
++         * Sets the checkable state of the item. If an item is checkable its
++         * checked state (as returned by {@link #isChecked()}) is indicated in
++         * the UI.
++         * 
++         * <p>
++         * An item is not checkable by default.
++         * </p>
++         * 
++         * <p>
++         * Items with sub items cannot be checkable.
++         * </p>
++         * 
++         * @param checkable
++         *            true if the item should be checkable, false otherwise
++         * @throws IllegalStateException
++         *             If the item has children
++         * @since 6.6.2
++         */
++        public void setCheckable(boolean checkable)
++                throws IllegalStateException {
++            if (hasChildren()) {
++                throw new IllegalStateException(
++                        "A menu item with children cannot be checkable");
++            }
++            this.checkable = checkable;
++            requestRepaint();
++        }
++
++        /**
++         * Gets the checked state of the item (checked or unchecked). Only used
++         * if the item is checkable (as indicated by {@link #isCheckable()}).
++         * The checked state is indicated in the UI with the item, if the item
++         * is checkable.
++         * 
++         * <p>
++         * An item is not checked by default.
++         * </p>
++         * 
++         * <p>
++         * The CSS style corresponding to the checked state is "-checked".
++         * </p>
++         * 
++         * @return true if the item is checked, false otherwise
++         * @since 6.6.2
++         */
++        public boolean isChecked() {
++            return checked;
++        }
++
++        /**
++         * Sets the checked state of the item. Only used if the item is
++         * checkable (indicated by {@link #isCheckable()}). The checked state is
++         * indicated in the UI with the item, if the item is checkable.
++         * 
++         * <p>
++         * An item is not checked by default.
++         * </p>
++         * 
++         * <p>
++         * The CSS style corresponding to the checked state is "-checked".
++         * </p>
++         * 
++         * @return true if the item is checked, false otherwise
++         * @since 6.6.2
++         */
++        public void setChecked(boolean checked) {
++            this.checked = checked;
++            requestRepaint();
++        }
++
      }// class MenuItem
  
  }// class MenuBar
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ac317380b887144ec8a8870ec07cf7f215b9fc6b
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,325 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
++<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
++<head profile="http://selenium-ide.openqa.org/profiles/test-case">
++<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
++<link rel="selenium.base" href="" />
++<title>New Test</title>
++</head>
++<body>
++<table cellpadding="1" cellspacing="1" border="1">
++<thead>
++<tr><td rowspan="1" colspan="3">New Test</td></tr>
++</thead><tbody>
++<!--Lower-right-->
++<tr>
++      <td>open</td>
++      <td>/run/com.vaadin.tests.components.LongTooltip?restartApplication</td>
++      <td></td>
++</tr>
++<!--Show tooltip, which should be on screen-->
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[3]/VTextField[0]</td>
++      <td>0,0</td>
++</tr>
++<!--Wait for tooltip to appear-->
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-lower-right-1</td>
++</tr>
++<!--Hide tooltip-->
++<tr>
++      <td>mouseOut</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td>55,43</td>
++</tr>
++<!--Wait for tooltip to disappear. Cannot for some reason use waitForNotVisible-->
++<tr>
++      <td>pause</td>
++      <td>500</td>
++      <td></td>
++</tr>
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[3]/VTextField[0]</td>
++      <td>0,0</td>
++</tr>
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-lower-right-2</td>
++</tr>
++<!--Hide tooltip-->
++<tr>
++      <td>mouseOut</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td>55,43</td>
++</tr>
++<!--Wait for tooltip to disappear. Cannot for some reason use waitForNotVisible-->
++<tr>
++      <td>pause</td>
++      <td>500</td>
++      <td></td>
++</tr>
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[3]/VTextField[0]</td>
++      <td>100,20</td>
++</tr>
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-lower-right-3</td>
++</tr>
++<!--Upper-right-->
++<tr>
++      <td>open</td>
++      <td>/run/com.vaadin.tests.components.LongTooltip?restartApplication</td>
++      <td></td>
++</tr>
++<!--Show tooltip, which should be on screen-->
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[1]/VTextField[0]</td>
++      <td>0,0</td>
++</tr>
++<!--Wait for tooltip to appear-->
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-upper-right-1</td>
++</tr>
++<!--Hide tooltip-->
++<tr>
++      <td>mouseOut</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td>55,43</td>
++</tr>
++<!--Wait for tooltip to disappear. Cannot for some reason use waitForNotVisible-->
++<tr>
++      <td>pause</td>
++      <td>500</td>
++      <td></td>
++</tr>
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[1]/VTextField[0]</td>
++      <td>0,0</td>
++</tr>
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-upper-right-2</td>
++</tr>
++<!--Hide tooltip-->
++<tr>
++      <td>mouseOut</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td>55,43</td>
++</tr>
++<!--Wait for tooltip to disappear. Cannot for some reason use waitForNotVisible-->
++<tr>
++      <td>pause</td>
++      <td>500</td>
++      <td></td>
++</tr>
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[1]/VTextField[0]</td>
++      <td>100,20</td>
++</tr>
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-upper-right-3</td>
++</tr>
++<!--Lower-left-->
++<tr>
++      <td>open</td>
++      <td>/run/com.vaadin.tests.components.LongTooltip?restartApplication</td>
++      <td></td>
++</tr>
++<!--Show tooltip, which should be on screen-->
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[2]/VTextField[0]</td>
++      <td>0,0</td>
++</tr>
++<!--Wait for tooltip to appear-->
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-lower-left-1</td>
++</tr>
++<!--Hide tooltip-->
++<tr>
++      <td>mouseOut</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td>55,43</td>
++</tr>
++<!--Wait for tooltip to disappear. Cannot for some reason use waitForNotVisible-->
++<tr>
++      <td>pause</td>
++      <td>500</td>
++      <td></td>
++</tr>
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[2]/VTextField[0]</td>
++      <td>0,0</td>
++</tr>
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-lower-left-2</td>
++</tr>
++<!--Hide tooltip-->
++<tr>
++      <td>mouseOut</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td>55,43</td>
++</tr>
++<!--Wait for tooltip to disappear. Cannot for some reason use waitForNotVisible-->
++<tr>
++      <td>pause</td>
++      <td>500</td>
++      <td></td>
++</tr>
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[2]/VTextField[0]</td>
++      <td>100,20</td>
++</tr>
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-lower-left-3</td>
++</tr>
++<!--Upper-left-->
++<tr>
++      <td>open</td>
++      <td>/run/com.vaadin.tests.components.LongTooltip?restartApplication</td>
++      <td></td>
++</tr>
++<!--Show tooltip, which should be on screen-->
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[0]/VTextField[0]</td>
++      <td>0,0</td>
++</tr>
++<!--Wait for tooltip to appear-->
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-upper-left-1</td>
++</tr>
++<!--Hide tooltip-->
++<tr>
++      <td>mouseOut</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td>55,43</td>
++</tr>
++<!--Wait for tooltip to disappear. Cannot for some reason use waitForNotVisible-->
++<tr>
++      <td>pause</td>
++      <td>500</td>
++      <td></td>
++</tr>
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[0]/VTextField[0]</td>
++      <td>0,0</td>
++</tr>
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-upper-left-2</td>
++</tr>
++<!--Hide tooltip-->
++<tr>
++      <td>mouseOut</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td>55,43</td>
++</tr>
++<!--Wait for tooltip to disappear. Cannot for some reason use waitForNotVisible-->
++<tr>
++      <td>pause</td>
++      <td>500</td>
++      <td></td>
++</tr>
++<tr>
++      <td>showTooltip</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[0]/VTextField[0]</td>
++      <td>100,20</td>
++</tr>
++<tr>
++      <td>waitForVisible</td>
++      <td>vaadin=runcomvaadintestscomponentsLongTooltip::Root/VTooltip[0]/FlowPanel[0]/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>tooltip-upper-left-3</td>
++</tr>
++
++</tbody></table>
++</body>
++</html>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..87adaa673b2bfa64ff425b9c627600475b5d2d8f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,49 @@@
++package com.vaadin.tests.components;\r
++\r
++import com.vaadin.tests.util.LoremIpsum;\r
++import com.vaadin.ui.Alignment;\r
++import com.vaadin.ui.GridLayout;\r
++import com.vaadin.ui.TextField;\r
++\r
++public class LongTooltip extends TestBase {\r
++\r
++    @Override\r
++    public void setup() {\r
++\r
++        GridLayout gl = new GridLayout(2, 2);\r
++        gl.setSizeFull();\r
++        TextField f1 = createField();\r
++        TextField f2 = createField();\r
++        TextField f3 = createField();\r
++        TextField f4 = createField();\r
++        gl.addComponent(f1);\r
++        gl.addComponent(f2);\r
++        gl.addComponent(f3);\r
++        gl.addComponent(f4);\r
++\r
++        gl.setComponentAlignment(f1, Alignment.TOP_LEFT);\r
++        gl.setComponentAlignment(f2, Alignment.TOP_RIGHT);\r
++        gl.setComponentAlignment(f3, Alignment.BOTTOM_LEFT);\r
++        gl.setComponentAlignment(f4, Alignment.BOTTOM_RIGHT);\r
++\r
++        getLayout().setSizeFull();\r
++        getLayout().addComponent(gl);\r
++\r
++    }\r
++\r
++    private TextField createField() {\r
++        final TextField field = new TextField();\r
++        field.setDescription(LoremIpsum.get(1000));\r
++        return field;\r
++    }\r
++\r
++    @Override\r
++    protected String getDescription() {\r
++        return "For a given cursor position the tooltip should always appear with the same size in the same position. The tooltip should also always be completely on screen and not cause any scrollbars to appear.";\r
++    }\r
++\r
++    @Override\r
++    protected Integer getTicketNumber() {\r
++        return 7100;\r
++    }\r
++}\r
index 48212b2fdcd60cbb3f147038db05c39de71c18e9,48212b2fdcd60cbb3f147038db05c39de71c18e9..387ec7857f5ebc7e62d1704755377aa8678a314f
@@@ -21,7 -21,7 +21,8 @@@ public class AccordionInactiveTabSize e
      @Override
      protected void setup() {
          HorizontalSplitPanel sp = new HorizontalSplitPanel();
--        sp.setSizeFull();
++        sp.setWidth("100%");
++        sp.setHeight("70px");
  
          Accordion acc = new Accordion();
  
index a398f7a17c16005082b878ebfc09660e59ee9719,a398f7a17c16005082b878ebfc09660e59ee9719..cab8bbc996e7017c89b3a9699344c4815f246ac1
@@@ -54,7 -54,7 +54,7 @@@
  <tr>
        <td>screenCapture</td>
        <td></td>
--      <td>combo should have ds1-3 text</td>
++      <td>combo-should-have-ds1-3-text</td>
  </tr>
  <tr>
        <td>click</td>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ae0dfec8283c80db0f9c75a9fbfdd5c8e9f6606f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,85 @@@
++<tr>
++      <td>open</td>
++      <td>/run/com.vaadin.tests.components.combobox.ComboBoxUndefinedWidthAndIcon?restartApplication</td>
++      <td></td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[1]</td>
++      <td>13,14</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
++      <td>32,5</td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>item1-selected</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[2]</td>
++      <td>12,5</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td>
++      <td>81,6</td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>page2</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td>
++      <td>78,6</td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>page3</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td>
++      <td>78,6</td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>page4</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item3</td>
++      <td>68,8</td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>item33-selected</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[2]</td>
++      <td>8,7</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::Root/VFilterSelect$SuggestionPopup[0]/domChild[0]/domChild[2]/domChild[0]</td>
++      <td>116,3</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxUndefinedWidthAndIcon::</td>
++      <td>338,241</td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>item33-selected-after-popup-opened-and-closed</td>
++</tr>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..fd5f7d47f80a6d7836de70434d528c2b970daa7f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,36 @@@
++package com.vaadin.tests.components.combobox;\r
++\r
++import com.vaadin.data.Item;\r
++import com.vaadin.terminal.Resource;\r
++import com.vaadin.terminal.ThemeResource;\r
++import com.vaadin.tests.components.TestBase;\r
++import com.vaadin.ui.ComboBox;\r
++\r
++public class ComboBoxUndefinedWidthAndIcon extends TestBase {\r
++    @Override\r
++    protected void setup() {\r
++        ComboBox cb = new ComboBox();\r
++        cb.addContainerProperty("caption", String.class, null);\r
++        cb.addContainerProperty("icon", Resource.class, null);\r
++        for (int i = 1; i < 200 + 1; i++) {\r
++            Item item = cb.addItem(i);\r
++            item.getItemProperty("caption").setValue("Item " + i);\r
++            item.getItemProperty("icon").setValue(\r
++                    new ThemeResource("../runo/icons/16/users.png"));\r
++        }\r
++        cb.setItemIconPropertyId("icon");\r
++        cb.setItemCaptionPropertyId("caption");\r
++\r
++        addComponent(cb);\r
++    }\r
++\r
++    @Override\r
++    protected String getDescription() {\r
++        return "The width of the ComboBox should be fixed even though it is set to undefined width. The width should not change when changing pages in the dropdown.";\r
++    }\r
++\r
++    @Override\r
++    protected Integer getTicketNumber() {\r
++        return 7013;\r
++    }\r
++}\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ebdfa81f2041d892e93ed256425c67826d485966
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,141 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
++<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
++<head profile="http://selenium-ide.openqa.org/profiles/test-case">
++<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
++<link rel="selenium.base" href="" />
++<title>MenuBarItemsCheckable</title>
++</head>
++<body>
++<table cellpadding="1" cellspacing="1" border="1">
++<thead>
++<tr><td rowspan="1" colspan="3">MenuBarItemsCheckable</td></tr>
++</thead><tbody>
++<tr>
++      <td>open</td>
++      <td>/run/com.vaadin.tests.components.menubar.MenuBarTest?restartApplication</td>
++      <td></td>
++</tr>
++<!--Hide event log to be able to compare screenshots-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::PID_Smenu#item1</td>
++      <td>30,7</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[0]/VMenuBar[0]#item0</td>
++      <td>27,3</td>
++</tr>
++<!--Make some items checkable-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::PID_Smenu#item0</td>
++      <td>43,12</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[0]/VMenuBar[0]#item5</td>
++      <td>47,9</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[1]/VMenuBar[0]#item4</td>
++      <td>48,5</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[2]/VMenuBar[0]#item2</td>
++      <td>90,11</td>
++</tr>
++<!--Show icons on some items-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::PID_Smenu#item0</td>
++      <td>13,1</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[0]/VMenuBar[0]#item5</td>
++      <td>47,3</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[1]/VMenuBar[0]#item0</td>
++      <td>26,4</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[2]/VMenuBar[0]#item3</td>
++      <td>39,7</td>
++</tr>
++<!--Set width to 100%-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::PID_Smenu#item0</td>
++      <td>23,9</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[0]/VMenuBar[0]#item2</td>
++      <td>36,6</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[1]/VMenuBar[0]#item0</td>
++      <td>27,7</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[2]/VMenuBar[0]#item2</td>
++      <td>23,3</td>
++</tr>
++<!--Open sub menu 1-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::PID_StestComponent#item0</td>
++      <td>51,10</td>
++</tr>
++<!--Open sub menu 1-1-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[0]/VMenuBar[0]#item0</td>
++      <td>51,10</td>
++</tr>
++<tr>
++      <td>pause</td>
++      <td>3000</td>
++      <td></td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>submenu-1-1-checkable-items</td>
++</tr>
++<!--Select item-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[1]/VMenuBar[0]#item0</td>
++      <td>51,10</td>
++</tr>
++<!--Open sub menu 1-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::PID_StestComponent#item0</td>
++      <td>51,10</td>
++</tr>
++<!--Open sub menu 1-1-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentsmenubarMenuBarTest::Root/VOverlay[0]/VMenuBar[0]#item0</td>
++      <td>51,10</td>
++</tr>
++<tr>
++      <td>screenCapture</td>
++      <td></td>
++      <td>submenu-1-1-checked-items</td>
++</tr>
++
++</tbody></table>
++</body>
++</html>
index 31121a8d370a43a2639e4a878907db40934cc1c0,1b11c24f7881a64842ce3dd011e23c2acbf2e952..e41652126d230d3b996b17d559f171e5aa949064
@@@ -24,6 -23,6 +24,7 @@@ public class MenuBarTest extends Abstra
      private Integer iconSize;\r
      private Integer disabledDensity;\r
      private Integer invisibleDensity;\r
++    private Integer checkableDensity;\r
  \r
      @Override\r
      protected Class<MenuBar> getTestClass() {\r
@@@ -46,6 -42,6 +47,7 @@@
          createMenuIconsSizeSelect(CATEGORY_MENU_ITEM_STATES);\r
          createMenuItemDisabledDensitySelect(CATEGORY_MENU_ITEM_STATES);\r
          createMenuItemInvisibleDensitySelect(CATEGORY_MENU_ITEM_STATES);\r
++        createMenuItemCheckableDensitySelect(CATEGORY_MENU_ITEM_STATES);\r
  \r
      }\r
  \r
                  setMenuItemInvisibleDensity);\r
      }\r
  \r
++    private void createMenuItemCheckableDensitySelect(String category) {\r
++        LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();\r
++        options.put("No items checkable", null);\r
++        options.put("All checkable", 1);\r
++        options.put("Every second", 2);\r
++        options.put("Every third", 3);\r
++\r
++        createSelectAction("Checkable", category, options,\r
++                "No items checkable", setMenuItemCheckableDensity);\r
++    }\r
++\r
      /* COMMANDS */\r
      Command<MenuBar, Integer> createRootMenuItems = new Command<MenuBar, Integer>() {\r
  \r
          }\r
      };\r
  \r
++    private Command<MenuBar, Integer> setMenuItemCheckableDensity = new Command<MenuBar, Integer>() {\r
++\r
++        public void execute(MenuBar c, Integer value, Object data) {\r
++            checkableDensity = value;\r
++            createRootItems(c);\r
++        }\r
++    };\r
++\r
      private Command<MenuBar, Integer> setSubMenuSeparatorDensity = new Command<MenuBar, Integer>() {\r
  \r
          public void execute(MenuBar c, Integer value, Object data) {\r
                  subMenuItem.setCommand(null);\r
                  createSubItems(subMenuItem, level + 1);\r
              }\r
++\r
++            if (!subMenuItem.hasChildren() && level > 0\r
++                    && checkableDensity != null && i % checkableDensity == 0) {\r
++                subMenuItem.setCheckable(true);\r
++            }\r
          }\r
  \r
      }\r
index edbdd72258c714d2fbd92a58ab34776c438879ff,edbdd72258c714d2fbd92a58ab34776c438879ff..eb40765d03fe1d24e4acb4200fc9d2dfddbcee24
@@@ -39,7 -39,7 +39,7 @@@
  <tr>
        <td>screenCapture</td>
        <td></td>
--      <td>click-287,25</td>
++      <td>click-287-25</td>
  </tr>
  <tr>
        <td>mouseClick</td>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..29d93ce86cdba28d9353e7ecd37fbb8da64e6130
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,15 @@@
++package com.vaadin.tests.components.panel;
++
++import com.vaadin.tests.components.AbstractComponentContainerTest;
++import com.vaadin.ui.Panel;
++
++public class PanelTest<T extends Panel> extends
++        AbstractComponentContainerTest<T> {
++
++    @SuppressWarnings("unchecked")
++    @Override
++    protected Class<T> getTestClass() {
++        return (Class<T>) Panel.class;
++    }
++
++}
index 9b6d964f44bf54ad587a79846961631094fdb228,9b6d964f44bf54ad587a79846961631094fdb228..65a2fdd1b5b0a4573984afa8c0a8a3baff5294eb
@@@ -55,7 -55,7 +55,7 @@@ public class SliderTest extends Abstrac
          LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();\r
          options.put("Horizontal", Slider.ORIENTATION_HORIZONTAL);\r
          options.put("Vertical", Slider.ORIENTATION_VERTICAL);\r
--        createSelectAction("Resolution", category, options, "Horizontal",\r
++        createSelectAction("Orientation", category, options, "Horizontal",\r
                  orientationCommand);\r
  \r
      }\r
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..a363f6980ecafd7191b418fee138e789ad091b9c
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,161 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
++<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
++<head profile="http://selenium-ide.openqa.org/profiles/test-case">
++<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
++<link rel="selenium.base" href="" />
++<title>New Test</title>
++</head>
++<body>
++<table cellpadding="1" cellspacing="1" border="1">
++<thead>
++<tr><td rowspan="1" colspan="3">New Test</td></tr>
++</thead><tbody>
++<tr>
++      <td>open</td>
++      <td>/run/com.vaadin.tests.components.table.Tables?restartApplication</td>
++      <td></td>
++</tr>
++<!--5 items-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::PID_Smenu#item0</td>
++      <td>25,7</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[0]/VMenuBar[0]#item5</td>
++      <td>50,2</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[1]/VMenuBar[0]#item1</td>
++      <td>86,10</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[2]/VMenuBar[0]#item5</td>
++      <td>53,6</td>
++</tr>
++<!--Item 1 context menu-->
++<tr>
++      <td>contextmenu</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::PID_StestComponent/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td>
++      <td></td>
++</tr>
++<!--Body context menu-->
++<tr>
++      <td>contextmenu</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::PID_StestComponent/domChild[1]</td>
++      <td></td>
++</tr>
++<!--Add context menu-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::PID_Smenu#item0</td>
++      <td>21,8</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[0]/VMenuBar[0]#item8</td>
++      <td>61,1</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[1]/VMenuBar[0]#item2</td>
++      <td>68,7</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[2]/VMenuBar[0]#item5</td>
++      <td>69,12</td>
++</tr>
++<!--Item 1 context menu-->
++<tr>
++      <td>contextmenu</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::PID_StestComponent/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>assertVisible</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VContextMenu[0]#option0</td>
++      <td></td>
++</tr>
++<tr>
++      <td>assertText</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VContextMenu[0]#option0</td>
++      <td>Edit Item 1</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VContextMenu[0]#option0</td>
++      <td>52,12</td>
++</tr>
++<!--Body context menu-->
++<tr>
++      <td>contextmenu</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::PID_StestComponent/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>assertVisible</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VContextMenu[0]#option0</td>
++      <td></td>
++</tr>
++<tr>
++      <td>assertText</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VContextMenu[0]#option0</td>
++      <td>New...</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VContextMenu[0]#option0</td>
++      <td>35,12</td>
++</tr>
++<!--Remove context menu-->
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::PID_Smenu#item0</td>
++      <td>20,8</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[0]/VMenuBar[0]#item8</td>
++      <td>67,3</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[1]/VMenuBar[0]#item2</td>
++      <td>71,7</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::Root/VOverlay[2]/VMenuBar[0]#item0</td>
++      <td>16,3</td>
++</tr>
++<!--Item 1 context menu-->
++<tr>
++      <td>contextmenu</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::PID_StestComponent/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>assertElementNotPresent</td>
++      <td>//div[@id='PID_VAADIN_CM']</td>
++      <td></td>
++</tr>
++<!--Body context menu-->
++<tr>
++      <td>contextmenu</td>
++      <td>vaadin=runcomvaadintestscomponentstableTables::PID_StestComponent/domChild[1]</td>
++      <td></td>
++</tr>
++<tr>
++      <td>assertElementNotPresent</td>
++      <td>//div[@id='PID_VAADIN_CM']</td>
++      <td></td>
++</tr>
++
++</tbody></table>
++</body>
++</html>
index a8030a960460af738162a37b5e527669271716e8,a8030a960460af738162a37b5e527669271716e8..c59e831582d5ecac3abceec699d259941f3ba4b8
@@@ -29,7 -29,7 +29,7 @@@
  <tr>
        <td>screenCapture</td>
        <td></td>
--      <td>dialog1 should be on top</td>
++      <td>dialog1-should-be-on-top</td>
  </tr>
  <tr>
        <td>mouseClick</td>
@@@ -44,7 -44,7 +44,7 @@@
  <tr>
        <td>screenCapture</td>
        <td></td>
--      <td>dialog 3 modal</td>
++      <td>dialog-3-modal</td>
  </tr>
  <tr>
        <td>mouseClick</td>
@@@ -84,7 -84,7 +84,7 @@@
  <tr>
        <td>screenCapture</td>
        <td></td>
--      <td>window5closed window 5 modal</td>
++      <td>window5closed-window-5-modal</td>
  </tr>
  <tr>
        <td>mouseClick</td>
  <tr>
        <td>screenCapture</td>
        <td></td>
--      <td>window2 on top of window1, others closed</td>
++      <td>window2-on-top-of-window1-others-closed</td>
  </tr>
  
  </tbody></table>
index 2109a532736fe6c74aadbc61901bb773036698e7,2109a532736fe6c74aadbc61901bb773036698e7..5cbd350174d8e2444337d9cea3f8206e888abb77
@@@ -54,7 -54,7 +54,7 @@@
  <tr>
        <td>screenCapture</td>
        <td></td>
--      <td>add+2 remove</td>
++      <td>add+2-remove</td>
  </tr>
  <tr>
        <td>click</td>
@@@ -79,7 -79,7 +79,7 @@@
  <tr>
        <td>screenCapture</td>
        <td></td>
--      <td>add-button only</td>
++      <td>add-button-only</td>
  </tr>
  
  </tbody></table>
index 7279a10b9caf49eefbf7d6e1f50db2acc34bfc74,7279a10b9caf49eefbf7d6e1f50db2acc34bfc74..3b2109e3f103c959db0483d15318dccb7723bcc0
@@@ -54,7 -54,7 +54,7 @@@
  <tr>
        <td>screenCapture</td>
        <td></td>
--      <td>add+2 remove</td>
++      <td>add+2-remove</td>
  </tr>
  <tr>
        <td>click</td>
@@@ -79,7 -79,7 +79,7 @@@
  <tr>
        <td>screenCapture</td>
        <td></td>
--      <td>add-button only</td>
++      <td>add-button-only</td>
  </tr>
  
  </tbody></table>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..83889aedb8bdd97f8e9531f208354bc6de32180f
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,77 @@@
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
++<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
++<head profile="http://selenium-ide.openqa.org/profiles/test-case">
++<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
++<link rel="selenium.base" href="http://arturwin.office.itmill.com:8888/" />
++<title>New Test</title>
++</head>
++<body>
++<table cellpadding="1" cellspacing="1" border="1">
++<thead>
++<tr><td rowspan="1" colspan="3">New Test</td></tr>
++</thead><tbody>
++<tr>
++      <td>open</td>
++      <td>/run/com.vaadin.tests.components.window.WindowTest?restartApplication</td>
++      <td></td>
++</tr>
++<tr>
++      <td>assertText</td>
++      <td>vaadin=runcomvaadintestscomponentswindowWindowTest::PID_StestComponent/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]</td>
++      <td>Short</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentswindowWindowTest::PID_Smenu#item0</td>
++      <td>52,19</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentswindowWindowTest::Root/VOverlay[0]/VMenuBar[0]#item1</td>
++      <td>85,4</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentswindowWindowTest::Root/VOverlay[1]/VMenuBar[0]#item2</td>
++      <td>67,9</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentswindowWindowTest::Root/VOverlay[2]/VMenuBar[0]#item2</td>
++      <td>23,11</td>
++</tr>
++<tr>
++      <td>assertText</td>
++      <td>vaadin=runcomvaadintestscomponentswindowWindowTest::PID_StestComponent/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]</td>
++      <td>This is a semi-long text that might wrap.</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentswindowWindowTest::PID_Smenu#item0</td>
++      <td>52,19</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentswindowWindowTest::Root/VOverlay[0]/VMenuBar[0]#item1</td>
++      <td>85,4</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentswindowWindowTest::Root/VOverlay[1]/VMenuBar[0]#item2</td>
++      <td>67,9</td>
++</tr>
++<tr>
++      <td>mouseClick</td>
++      <td>vaadin=runcomvaadintestscomponentswindowWindowTest::Root/VOverlay[2]/VMenuBar[0]#item0</td>
++      <td>23,11</td>
++</tr>
++<tr>
++      <td>assertText</td>
++      <td>vaadin=runcomvaadintestscomponentswindowWindowTest::PID_StestComponent/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]</td>
++      <td></td>
++</tr>
++
++</tbody></table>
++</body>
++</html>
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..ae3b0f22dfc4558ba7e414381d768fa7d6a91327
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,19 @@@
++package com.vaadin.tests.components.window;
++
++import com.vaadin.tests.components.panel.PanelTest;
++import com.vaadin.ui.Window;
++
++public class WindowTest extends PanelTest<Window> {
++
++    @Override
++    protected Class<Window> getTestClass() {
++        return Window.class;
++    }
++
++    @Override
++    protected void addTestComponent(Window c) {
++        getMainWindow().addWindow(c);
++        getTestComponents().add(c);
++    }
++
++}
index 67ad4fe45f6e85caec04fa95ecd76e2945696ca4,67ad4fe45f6e85caec04fa95ecd76e2945696ca4..5ca8194646a1114d31f6a6ffdff3ce853e63c319
@@@ -1,5 -1,5 +1,7 @@@
  package com.vaadin.tests.server.container;\r
  \r
++import com.vaadin.data.Container.Filter;\r
++import com.vaadin.data.Item;\r
  import com.vaadin.data.util.HierarchicalContainer;\r
  \r
  public class TestHierarchicalContainer extends\r
          testContainerSortingAndFiltering(new HierarchicalContainer());\r
      }\r
  \r
++    public void testRemovingItemsFromFilteredContainer() {\r
++        HierarchicalContainer container = new HierarchicalContainer();\r
++        initializeContainer(container);\r
++        container.setIncludeParentsWhenFiltering(true);\r
++        container.addContainerFilter(FULLY_QUALIFIED_NAME, "ab", false, false);\r
++        Object p1 = container.getParent("com.vaadin.ui.TabSheet");\r
++        assertEquals("com.vaadin.ui", p1);\r
++\r
++        container.removeItem("com.vaadin.ui.TabSheet");\r
++        // Parent for the removed item must be null because the item is no\r
++        // longer in the container\r
++        p1 = container.getParent("com.vaadin.ui.TabSheet");\r
++        assertNull("Parent should be null, is " + p1, p1);\r
++\r
++        container.removeAllItems();\r
++        p1 = container.getParent("com.vaadin.terminal.gwt.client.Focusable");\r
++        assertNull("Parent should be null, is " + p1, p1);\r
++\r
++    }\r
++\r
++    public void testParentWhenRemovingFilterFromContainer() {\r
++        HierarchicalContainer container = new HierarchicalContainer();\r
++        initializeContainer(container);\r
++        container.setIncludeParentsWhenFiltering(true);\r
++        container.addContainerFilter(FULLY_QUALIFIED_NAME, "ab", false, false);\r
++        Object p1 = container.getParent("com.vaadin.ui.TabSheet");\r
++        assertEquals("com.vaadin.ui", p1);\r
++        p1 = container\r
++                .getParent("com.vaadin.terminal.gwt.client.ui.VPopupCalendar");\r
++        assertNull(p1);\r
++        container.removeAllContainerFilters();\r
++        p1 = container\r
++                .getParent("com.vaadin.terminal.gwt.client.ui.VPopupCalendar");\r
++        assertEquals("com.vaadin.terminal.gwt.client.ui", p1);\r
++\r
++    }\r
++\r
++    public void testChangeParentInFilteredContainer() {\r
++        HierarchicalContainer container = new HierarchicalContainer();\r
++        initializeContainer(container);\r
++        container.setIncludeParentsWhenFiltering(true);\r
++        container.addContainerFilter(FULLY_QUALIFIED_NAME, "Tab", false, false);\r
++\r
++        // Change parent of filtered item\r
++        Object p1 = container.getParent("com.vaadin.ui.TabSheet");\r
++        assertEquals("com.vaadin.ui", p1);\r
++        container.setParent("com.vaadin.ui.TabSheet", "com.vaadin");\r
++        p1 = container.getParent("com.vaadin.ui.TabSheet");\r
++        assertEquals("com.vaadin", p1);\r
++        container.setParent("com.vaadin.ui.TabSheet", "com");\r
++        p1 = container.getParent("com.vaadin.ui.TabSheet");\r
++        assertEquals("com", p1);\r
++        container.setParent("com.vaadin.ui.TabSheet", null);\r
++        p1 = container.getParent("com.vaadin.ui.TabSheet");\r
++        assertNull(p1);\r
++\r
++        // root -> non-root\r
++        container.setParent("com.vaadin.ui.TabSheet", "com");\r
++        p1 = container.getParent("com.vaadin.ui.TabSheet");\r
++        assertEquals("com", p1);\r
++\r
++    }\r
++\r
      public void testHierarchicalFilteringWithParents() {\r
          HierarchicalContainer container = new HierarchicalContainer();\r
          initializeContainer(container);\r
  \r
      }\r
  \r
++    public void testRemoveLastChild() {\r
++        HierarchicalContainer c = new HierarchicalContainer();\r
++\r
++        c.addItem("root");\r
++        assertEquals(false, c.hasChildren("root"));\r
++\r
++        c.addItem("child");\r
++        c.setParent("child", "root");\r
++        assertEquals(true, c.hasChildren("root"));\r
++\r
++        c.removeItem("child");\r
++        assertFalse(c.containsId("child"));\r
++        assertNull(c.getChildren("root"));\r
++        assertNull(c.getChildren("child"));\r
++        assertFalse(c.hasChildren("child"));\r
++        assertFalse(c.hasChildren("root"));\r
++    }\r
++\r
++    public void testRemoveLastChildFromFiltered() {\r
++        HierarchicalContainer c = new HierarchicalContainer();\r
++\r
++        c.addItem("root");\r
++        assertEquals(false, c.hasChildren("root"));\r
++\r
++        c.addItem("child");\r
++        c.setParent("child", "root");\r
++        assertEquals(true, c.hasChildren("root"));\r
++\r
++        // Dummy filter that does not remove any items\r
++        c.addContainerFilter(new Filter() {\r
++\r
++            public boolean passesFilter(Object itemId, Item item)\r
++                    throws UnsupportedOperationException {\r
++                return true;\r
++            }\r
++\r
++            public boolean appliesToProperty(Object propertyId) {\r
++                return true;\r
++            }\r
++        });\r
++        c.removeItem("child");\r
++\r
++        assertFalse(c.containsId("child"));\r
++        assertNull(c.getChildren("root"));\r
++        assertNull(c.getChildren("child"));\r
++        assertFalse(c.hasChildren("child"));\r
++        assertFalse(c.hasChildren("root"));\r
++    }\r
++\r
      public void testHierarchicalFilteringWithoutParents() {\r
          HierarchicalContainer container = new HierarchicalContainer();\r
  \r