diff options
author | Henri Sara <hesara@vaadin.com> | 2014-05-16 11:41:42 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2014-05-16 13:03:09 +0300 |
commit | b4180f2388a6ec97c422097f16da617114aba590 (patch) | |
tree | 86d73cb261f89d7360d5810e2986a6e78e066374 /client | |
parent | e65231e6028892bd6847777c5bad982b73278b14 (diff) | |
parent | 0f74fdff68cef4eac27913bb4fd0943ff39ca604 (diff) | |
download | vaadin-framework-b4180f2388a6ec97c422097f16da617114aba590.tar.gz vaadin-framework-b4180f2388a6ec97c422097f16da617114aba590.zip |
Merge master into valo7.3.0.alpha2
This change does not include all release notes updates
from master.
Change-Id: I209dc06d03d4541ac33746d1161630f0ca8ae5d9
Diffstat (limited to 'client')
370 files changed, 1710 insertions, 653 deletions
diff --git a/client/src/com/vaadin/Vaadin.gwt.xml b/client/src/com/vaadin/Vaadin.gwt.xml index d4eb454e86..711729f64f 100644 --- a/client/src/com/vaadin/Vaadin.gwt.xml +++ b/client/src/com/vaadin/Vaadin.gwt.xml @@ -1,4 +1,3 @@ - <module> <!-- This GWT module inherits all Vaadin client side functionality modules. This is the module you want to inherit in your client side project to be @@ -64,4 +63,38 @@ <!-- Remove IE6/IE7 permutation as they are not supported --> <set-property name="user.agent" value="ie8,ie9,ie10,gecko1_8,safari,opera" /> + <!-- Pointer event support --> + <define-property name="modernie" values="none,yes" /> + <property-provider name="modernie"><![CDATA[ + { + var ua = $wnd.navigator.userAgent; + if (ua.indexOf('IE') == -1 && ua.indexOf('Trident') != -1) { return 'yes'; } + return 'none'; + } + ]]></property-provider> + + <set-property name="modernie" value="none"> + <none> + <when-property-is name="user.agent" value="gecko1_8" /> + </none> + </set-property> + + <!-- Fall through to this rule when the browser doesn't support pointer + event --> + <replace-with class="com.vaadin.client.event.PointerEventSupportImpl"> + <when-type-is class="com.vaadin.client.event.PointerEventSupportImpl" /> + </replace-with> + + <replace-with + class="com.vaadin.client.event.PointerEventSupportImplModernIE"> + <when-type-is class="com.vaadin.client.event.PointerEventSupportImpl" /> + <none> + <when-property-is value="none" name="modernie" /> + </none> + </replace-with> + + <replace-with class="com.vaadin.client.event.PointerEventSupportImplIE10"> + <when-type-is class="com.vaadin.client.event.PointerEventSupportImpl" /> + <when-property-is value="ie10" name="user.agent" /> + </replace-with> </module> diff --git a/client/src/com/vaadin/client/ApplicationConfiguration.java b/client/src/com/vaadin/client/ApplicationConfiguration.java index 16cdc759fa..17dce8a0f0 100644 --- a/client/src/com/vaadin/client/ApplicationConfiguration.java +++ b/client/src/com/vaadin/client/ApplicationConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -45,6 +45,7 @@ import com.vaadin.client.debug.internal.Section; import com.vaadin.client.debug.internal.TestBenchSection; import com.vaadin.client.debug.internal.VDebugWindow; import com.vaadin.client.debug.internal.theme.DebugWindowStyles; +import com.vaadin.client.event.PointerEventSupport; import com.vaadin.client.metadata.BundleLoadCallback; import com.vaadin.client.metadata.ConnectorBundleLoader; import com.vaadin.client.metadata.NoDataException; @@ -612,6 +613,9 @@ public class ApplicationConfiguration implements EntryPoint { enableIEPromptFix(); } + // Register pointer events (must be done before any events are used) + PointerEventSupport.init(); + // Prepare the debugging window if (isDebugMode()) { /* diff --git a/client/src/com/vaadin/client/ApplicationConnection.java b/client/src/com/vaadin/client/ApplicationConnection.java index 5d614439bb..6dcc2abb44 100644 --- a/client/src/com/vaadin/client/ApplicationConnection.java +++ b/client/src/com/vaadin/client/ApplicationConnection.java @@ -1,5 +1,5 @@ -/* - * Copyright 2000-2013 Vaadin Ltd. +/* + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -65,7 +65,6 @@ import com.google.gwt.user.client.Window.ClosingHandler; import com.google.gwt.user.client.ui.HasWidgets; import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.ApplicationConfiguration.ErrorMessage; -import com.vaadin.client.ApplicationConnection.ApplicationStoppedEvent; import com.vaadin.client.ResourceLoader.ResourceLoadEvent; import com.vaadin.client.ResourceLoader.ResourceLoadListener; import com.vaadin.client.communication.HasJavaScriptConnectorHelper; diff --git a/client/src/com/vaadin/client/BrowserInfo.java b/client/src/com/vaadin/client/BrowserInfo.java index 78c5c1f59f..e8b8d8309a 100644 --- a/client/src/com/vaadin/client/BrowserInfo.java +++ b/client/src/com/vaadin/client/BrowserInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/CSSRule.java b/client/src/com/vaadin/client/CSSRule.java index 63a136175b..a1ddce6d0a 100644 --- a/client/src/com/vaadin/client/CSSRule.java +++ b/client/src/com/vaadin/client/CSSRule.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ComponentConnector.java b/client/src/com/vaadin/client/ComponentConnector.java index f923a9dade..d0c943d553 100644 --- a/client/src/com/vaadin/client/ComponentConnector.java +++ b/client/src/com/vaadin/client/ComponentConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ComponentDetail.java b/client/src/com/vaadin/client/ComponentDetail.java index 58b72b3d95..9e5e2a82a8 100644 --- a/client/src/com/vaadin/client/ComponentDetail.java +++ b/client/src/com/vaadin/client/ComponentDetail.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ComponentDetailMap.java b/client/src/com/vaadin/client/ComponentDetailMap.java index 94eba721b1..c99ebd2738 100644 --- a/client/src/com/vaadin/client/ComponentDetailMap.java +++ b/client/src/com/vaadin/client/ComponentDetailMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ComponentLocator.java b/client/src/com/vaadin/client/ComponentLocator.java deleted file mode 100644 index f30528c0c0..0000000000 --- a/client/src/com/vaadin/client/ComponentLocator.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2000-2013 Vaadin Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - */ -package com.vaadin.client; - -/** - * ComponentLocator provides methods for generating a String locator for a given - * DOM element and for locating a DOM element using a String locator. - * - * @since 5.4 - * @deprecated Moved to com.vaadin.client.componentlocator.ComponentLocator - */ -public class ComponentLocator extends - com.vaadin.client.componentlocator.ComponentLocator { - /** - * Construct a ComponentLocator for the given ApplicationConnection. - * - * @param client - * ApplicationConnection instance for the application. - */ - public ComponentLocator(ApplicationConnection client) { - super(client); - } -} diff --git a/client/src/com/vaadin/client/ComputedStyle.java b/client/src/com/vaadin/client/ComputedStyle.java index db8ed037bf..e806e9e197 100644 --- a/client/src/com/vaadin/client/ComputedStyle.java +++ b/client/src/com/vaadin/client/ComputedStyle.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java b/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java index 2896386933..55494af0d4 100644 --- a/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java +++ b/client/src/com/vaadin/client/ConnectorHierarchyChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -103,4 +103,4 @@ public class ConnectorHierarchyChangeEvent extends return TYPE; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ConnectorMap.java b/client/src/com/vaadin/client/ConnectorMap.java index c2f1eda21d..1211eb2684 100644 --- a/client/src/com/vaadin/client/ConnectorMap.java +++ b/client/src/com/vaadin/client/ConnectorMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ContainerResizedListener.java b/client/src/com/vaadin/client/ContainerResizedListener.java index 602e57abc0..702542f0ac 100644 --- a/client/src/com/vaadin/client/ContainerResizedListener.java +++ b/client/src/com/vaadin/client/ContainerResizedListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/DateTimeService.java b/client/src/com/vaadin/client/DateTimeService.java index 2388bd38fb..bf57261c72 100644 --- a/client/src/com/vaadin/client/DateTimeService.java +++ b/client/src/com/vaadin/client/DateTimeService.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/DirectionalManagedLayout.java b/client/src/com/vaadin/client/DirectionalManagedLayout.java index 887593acf3..eab9811082 100644 --- a/client/src/com/vaadin/client/DirectionalManagedLayout.java +++ b/client/src/com/vaadin/client/DirectionalManagedLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,4 +21,4 @@ public interface DirectionalManagedLayout extends ManagedLayout { public void layoutVertically(); public void layoutHorizontally(); -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/EventHelper.java b/client/src/com/vaadin/client/EventHelper.java index ef1326b52c..a1cb75527d 100644 --- a/client/src/com/vaadin/client/EventHelper.java +++ b/client/src/com/vaadin/client/EventHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/FastStringMap.java b/client/src/com/vaadin/client/FastStringMap.java index 5b15b1263a..ba3d07025b 100644 --- a/client/src/com/vaadin/client/FastStringMap.java +++ b/client/src/com/vaadin/client/FastStringMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/FastStringSet.java b/client/src/com/vaadin/client/FastStringSet.java index a36aa9bfef..756bd374dc 100644 --- a/client/src/com/vaadin/client/FastStringSet.java +++ b/client/src/com/vaadin/client/FastStringSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -98,4 +98,4 @@ public final class FastStringSet extends JavaScriptObject { } } }-*/; -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/Focusable.java b/client/src/com/vaadin/client/Focusable.java index 3204b6c6a8..05b32a7b05 100644 --- a/client/src/com/vaadin/client/Focusable.java +++ b/client/src/com/vaadin/client/Focusable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/HasComponentsConnector.java b/client/src/com/vaadin/client/HasComponentsConnector.java index ebc6dbcd2a..3d8df3b8cd 100644 --- a/client/src/com/vaadin/client/HasComponentsConnector.java +++ b/client/src/com/vaadin/client/HasComponentsConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/JavaScriptConnectorHelper.java b/client/src/com/vaadin/client/JavaScriptConnectorHelper.java index 52d2eeb6dc..c4b36d6453 100644 --- a/client/src/com/vaadin/client/JavaScriptConnectorHelper.java +++ b/client/src/com/vaadin/client/JavaScriptConnectorHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/JavaScriptExtension.java b/client/src/com/vaadin/client/JavaScriptExtension.java index 73fc1e3c57..9c60d38a5a 100644 --- a/client/src/com/vaadin/client/JavaScriptExtension.java +++ b/client/src/com/vaadin/client/JavaScriptExtension.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/JsArrayObject.java b/client/src/com/vaadin/client/JsArrayObject.java index 5b45650684..b6dcf3789d 100644 --- a/client/src/com/vaadin/client/JsArrayObject.java +++ b/client/src/com/vaadin/client/JsArrayObject.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/LayoutManager.java b/client/src/com/vaadin/client/LayoutManager.java index fbf540273f..bf79009f4c 100644 --- a/client/src/com/vaadin/client/LayoutManager.java +++ b/client/src/com/vaadin/client/LayoutManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; +import java.util.logging.Logger; import com.google.gwt.core.client.Duration; import com.google.gwt.core.client.JsArrayString; @@ -827,6 +828,12 @@ public class LayoutManager { /** * Marks that a ManagedLayout should be layouted in the next layout phase * even if none of the elements managed by the layout have been resized. + * <p> + * This method should not be invoked during a layout phase since it only + * controls what will happen in the beginning of the next phase. If you want + * to explicitly cause some layout to be considered in an ongoing layout + * phase, you should use {@link #setNeedsMeasure(ComponentConnector)} + * instead. * * @param layout * the managed layout that should be layouted @@ -840,14 +847,25 @@ public class LayoutManager { * Marks that a ManagedLayout should be layouted horizontally in the next * layout phase even if none of the elements managed by the layout have been * resized horizontally. - * + * <p> * For SimpleManagedLayout which is always layouted in both directions, this * has the same effect as {@link #setNeedsLayout(ManagedLayout)}. + * <p> + * This method should not be invoked during a layout phase since it only + * controls what will happen in the beginning of the next phase. If you want + * to explicitly cause some layout to be considered in an ongoing layout + * phase, you should use {@link #setNeedsMeasure(ComponentConnector)} + * instead. * * @param layout * the managed layout that should be layouted */ public final void setNeedsHorizontalLayout(ManagedLayout layout) { + if (isLayoutRunning()) { + getLogger() + .warning( + "setNeedsHorizontalLayout should not be run while a layout phase is in progress."); + } needsHorizontalLayout.add(layout.getConnectorId()); } @@ -855,14 +873,25 @@ public class LayoutManager { * Marks that a ManagedLayout should be layouted vertically in the next * layout phase even if none of the elements managed by the layout have been * resized vertically. - * + * <p> * For SimpleManagedLayout which is always layouted in both directions, this * has the same effect as {@link #setNeedsLayout(ManagedLayout)}. + * <p> + * This method should not be invoked during a layout phase since it only + * controls what will happen in the beginning of the next phase. If you want + * to explicitly cause some layout to be considered in an ongoing layout + * phase, you should use {@link #setNeedsMeasure(ComponentConnector)} + * instead. * * @param layout * the managed layout that should be layouted */ public final void setNeedsVerticalLayout(ManagedLayout layout) { + if (isLayoutRunning()) { + getLogger() + .warning( + "setNeedsVerticalLayout should not be run while a layout phase is in progress."); + } needsVerticalLayout.add(layout.getConnectorId()); } @@ -1609,4 +1638,8 @@ public class LayoutManager { protected void cleanMeasuredSizes() { } + private static Logger getLogger() { + return Logger.getLogger(LayoutManager.class.getName()); + } + } diff --git a/client/src/com/vaadin/client/LayoutManagerIE8.java b/client/src/com/vaadin/client/LayoutManagerIE8.java index 97e3059a22..941ac589b2 100644 --- a/client/src/com/vaadin/client/LayoutManagerIE8.java +++ b/client/src/com/vaadin/client/LayoutManagerIE8.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/LocaleNotLoadedException.java b/client/src/com/vaadin/client/LocaleNotLoadedException.java index 9761750084..6f59e786e4 100644 --- a/client/src/com/vaadin/client/LocaleNotLoadedException.java +++ b/client/src/com/vaadin/client/LocaleNotLoadedException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/LocaleService.java b/client/src/com/vaadin/client/LocaleService.java index 69345d7174..dcd1c9ea4e 100644 --- a/client/src/com/vaadin/client/LocaleService.java +++ b/client/src/com/vaadin/client/LocaleService.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/MeasuredSize.java b/client/src/com/vaadin/client/MeasuredSize.java index bc6ef789d0..2531ff9389 100644 --- a/client/src/com/vaadin/client/MeasuredSize.java +++ b/client/src/com/vaadin/client/MeasuredSize.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -289,4 +289,4 @@ public class MeasuredSize { return sizes1[0] != sizes2[0] || sizes1[2] != sizes2[2]; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/MouseEventDetailsBuilder.java b/client/src/com/vaadin/client/MouseEventDetailsBuilder.java index 85418d6807..313fe682fd 100644 --- a/client/src/com/vaadin/client/MouseEventDetailsBuilder.java +++ b/client/src/com/vaadin/client/MouseEventDetailsBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/Paintable.java b/client/src/com/vaadin/client/Paintable.java index 543f71783b..34f2d0714f 100644 --- a/client/src/com/vaadin/client/Paintable.java +++ b/client/src/com/vaadin/client/Paintable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/Profiler.java b/client/src/com/vaadin/client/Profiler.java index cfce59b08b..2174e00de1 100644 --- a/client/src/com/vaadin/client/Profiler.java +++ b/client/src/com/vaadin/client/Profiler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/RenderInformation.java b/client/src/com/vaadin/client/RenderInformation.java index 4d856e90ee..8fd3fc7e0b 100644 --- a/client/src/com/vaadin/client/RenderInformation.java +++ b/client/src/com/vaadin/client/RenderInformation.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/RenderSpace.java b/client/src/com/vaadin/client/RenderSpace.java index d58932f3b9..5a7440b682 100644 --- a/client/src/com/vaadin/client/RenderSpace.java +++ b/client/src/com/vaadin/client/RenderSpace.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ResourceLoader.java b/client/src/com/vaadin/client/ResourceLoader.java index 3d8eb739b1..67b878001e 100644 --- a/client/src/com/vaadin/client/ResourceLoader.java +++ b/client/src/com/vaadin/client/ResourceLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ServerConnector.java b/client/src/com/vaadin/client/ServerConnector.java index 676d5626d1..4eaa7bc086 100644 --- a/client/src/com/vaadin/client/ServerConnector.java +++ b/client/src/com/vaadin/client/ServerConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/SimpleTree.java b/client/src/com/vaadin/client/SimpleTree.java index 39e76a6d75..3c63f54d5f 100644 --- a/client/src/com/vaadin/client/SimpleTree.java +++ b/client/src/com/vaadin/client/SimpleTree.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/StyleConstants.java b/client/src/com/vaadin/client/StyleConstants.java index d54c72c38b..c4588587d4 100644 --- a/client/src/com/vaadin/client/StyleConstants.java +++ b/client/src/com/vaadin/client/StyleConstants.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/SuperDevMode.java b/client/src/com/vaadin/client/SuperDevMode.java index a6e5d9b1ec..f1020b3d25 100644 --- a/client/src/com/vaadin/client/SuperDevMode.java +++ b/client/src/com/vaadin/client/SuperDevMode.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -246,10 +246,9 @@ public class SuperDevMode { // in super dev mode, as a result of the recompile, the enabled // check will fail... if (!isSuperDevModeEnabledInModule()) { - showError("SuperDevMode is not enabled for this module/widgetset.<br/>" - + "Ensure that your module definition (.gwt.xml) contains <br/>" - + "<add-linker name="xsiframe"/><br/>" - + "<set-configuration-property name="devModeRedirectEnabled" value="true" /><br/>"); + showError("SuperDevMode is disabled for this module/widgetset.<br/>" + + "Ensure that your module definition (.gwt.xml) does not contain <br/>" + + "<set-configuration-property name="devModeRedirectEnabled" value="false" /><br/>"); return false; } return SuperDevMode.recompileIfNeeded(superDevModeParameter); diff --git a/client/src/com/vaadin/client/TooltipInfo.java b/client/src/com/vaadin/client/TooltipInfo.java index 961a6e3a67..67d2ad37c2 100644 --- a/client/src/com/vaadin/client/TooltipInfo.java +++ b/client/src/com/vaadin/client/TooltipInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/UIDL.java b/client/src/com/vaadin/client/UIDL.java index 732fcc33d4..2c2a5de308 100644 --- a/client/src/com/vaadin/client/UIDL.java +++ b/client/src/com/vaadin/client/UIDL.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/Util.java b/client/src/com/vaadin/client/Util.java index 730f844985..7eeaad2d68 100644 --- a/client/src/com/vaadin/client/Util.java +++ b/client/src/com/vaadin/client/Util.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/VCaption.java b/client/src/com/vaadin/client/VCaption.java index 1b98a0fa78..b0d6a3a8a9 100644 --- a/client/src/com/vaadin/client/VCaption.java +++ b/client/src/com/vaadin/client/VCaption.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/VCaptionWrapper.java b/client/src/com/vaadin/client/VCaptionWrapper.java index 789e75d9a1..382126f409 100644 --- a/client/src/com/vaadin/client/VCaptionWrapper.java +++ b/client/src/com/vaadin/client/VCaptionWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/VConsole.java b/client/src/com/vaadin/client/VConsole.java index 32eb206a70..c01711c5b3 100644 --- a/client/src/com/vaadin/client/VConsole.java +++ b/client/src/com/vaadin/client/VConsole.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/VErrorMessage.java b/client/src/com/vaadin/client/VErrorMessage.java index 77b3970aba..271c7b1be8 100644 --- a/client/src/com/vaadin/client/VErrorMessage.java +++ b/client/src/com/vaadin/client/VErrorMessage.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/VLoadingIndicator.java b/client/src/com/vaadin/client/VLoadingIndicator.java index 3a6f8e08bb..e873005d3a 100644 --- a/client/src/com/vaadin/client/VLoadingIndicator.java +++ b/client/src/com/vaadin/client/VLoadingIndicator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/VSchedulerImpl.java b/client/src/com/vaadin/client/VSchedulerImpl.java index baeb61c574..2c0657eb59 100644 --- a/client/src/com/vaadin/client/VSchedulerImpl.java +++ b/client/src/com/vaadin/client/VSchedulerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/VTooltip.java b/client/src/com/vaadin/client/VTooltip.java index 9badd0ca1c..54e42a118d 100644 --- a/client/src/com/vaadin/client/VTooltip.java +++ b/client/src/com/vaadin/client/VTooltip.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/VUIDLBrowser.java b/client/src/com/vaadin/client/VUIDLBrowser.java index ee64a5b7b0..4b4fd2f389 100644 --- a/client/src/com/vaadin/client/VUIDLBrowser.java +++ b/client/src/com/vaadin/client/VUIDLBrowser.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ValueMap.java b/client/src/com/vaadin/client/ValueMap.java index 4141eaa9d6..172fd84a84 100644 --- a/client/src/com/vaadin/client/ValueMap.java +++ b/client/src/com/vaadin/client/ValueMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -118,4 +118,4 @@ public final class ValueMap extends JavaScriptObject { return this[name]; }-*/; -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/WidgetInstantiator.java b/client/src/com/vaadin/client/WidgetInstantiator.java index 81ff68a03b..727db967ef 100644 --- a/client/src/com/vaadin/client/WidgetInstantiator.java +++ b/client/src/com/vaadin/client/WidgetInstantiator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/WidgetLoader.java b/client/src/com/vaadin/client/WidgetLoader.java index 6095768fea..4cc1cd1d5f 100644 --- a/client/src/com/vaadin/client/WidgetLoader.java +++ b/client/src/com/vaadin/client/WidgetLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/WidgetMap.java b/client/src/com/vaadin/client/WidgetMap.java index 67965cc111..ec053eb511 100644 --- a/client/src/com/vaadin/client/WidgetMap.java +++ b/client/src/com/vaadin/client/WidgetMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/WidgetSet.java b/client/src/com/vaadin/client/WidgetSet.java index 34e18a5e4e..eff98a146a 100644 --- a/client/src/com/vaadin/client/WidgetSet.java +++ b/client/src/com/vaadin/client/WidgetSet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/annotations/OnStateChange.java b/client/src/com/vaadin/client/annotations/OnStateChange.java index 8223507b7f..d15e32f493 100644 --- a/client/src/com/vaadin/client/annotations/OnStateChange.java +++ b/client/src/com/vaadin/client/annotations/OnStateChange.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/AbstractServerConnectorEvent.java b/client/src/com/vaadin/client/communication/AbstractServerConnectorEvent.java index 67b4d25f49..9f99a451e1 100644 --- a/client/src/com/vaadin/client/communication/AbstractServerConnectorEvent.java +++ b/client/src/com/vaadin/client/communication/AbstractServerConnectorEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java index f0e3eb5b48..48e17cde05 100644 --- a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java +++ b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -340,7 +340,7 @@ public class AtmospherePushConnection implements PushConnection { } protected void onClose(AtmosphereResponse response) { - VConsole.log("Push connection closed, awaiting reconnection"); + VConsole.log("Push connection closed"); state = State.CONNECT_PENDING; } diff --git a/client/src/com/vaadin/client/communication/Date_Serializer.java b/client/src/com/vaadin/client/communication/Date_Serializer.java index c6eb7af188..15ef3869aa 100644 --- a/client/src/com/vaadin/client/communication/Date_Serializer.java +++ b/client/src/com/vaadin/client/communication/Date_Serializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/DiffJSONSerializer.java b/client/src/com/vaadin/client/communication/DiffJSONSerializer.java index ffb71d9595..59575604a1 100644 --- a/client/src/com/vaadin/client/communication/DiffJSONSerializer.java +++ b/client/src/com/vaadin/client/communication/DiffJSONSerializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/HasJavaScriptConnectorHelper.java b/client/src/com/vaadin/client/communication/HasJavaScriptConnectorHelper.java index 902480418d..deb5900b89 100644 --- a/client/src/com/vaadin/client/communication/HasJavaScriptConnectorHelper.java +++ b/client/src/com/vaadin/client/communication/HasJavaScriptConnectorHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/Heartbeat.java b/client/src/com/vaadin/client/communication/Heartbeat.java index 4b80827127..f2253f3faa 100644 --- a/client/src/com/vaadin/client/communication/Heartbeat.java +++ b/client/src/com/vaadin/client/communication/Heartbeat.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/JSONSerializer.java b/client/src/com/vaadin/client/communication/JSONSerializer.java index a4e78e503c..3327baf842 100644 --- a/client/src/com/vaadin/client/communication/JSONSerializer.java +++ b/client/src/com/vaadin/client/communication/JSONSerializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/JavaScriptMethodInvocation.java b/client/src/com/vaadin/client/communication/JavaScriptMethodInvocation.java index b9743ee536..43366902e2 100644 --- a/client/src/com/vaadin/client/communication/JavaScriptMethodInvocation.java +++ b/client/src/com/vaadin/client/communication/JavaScriptMethodInvocation.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/JsonDecoder.java b/client/src/com/vaadin/client/communication/JsonDecoder.java index e1ee1fd7b7..37c113bb2f 100644 --- a/client/src/com/vaadin/client/communication/JsonDecoder.java +++ b/client/src/com/vaadin/client/communication/JsonDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/JsonEncoder.java b/client/src/com/vaadin/client/communication/JsonEncoder.java index 49cd613a2c..6783e802ec 100644 --- a/client/src/com/vaadin/client/communication/JsonEncoder.java +++ b/client/src/com/vaadin/client/communication/JsonEncoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/PushConnection.java b/client/src/com/vaadin/client/communication/PushConnection.java index ba79af9d2c..3bdb18ff1b 100644 --- a/client/src/com/vaadin/client/communication/PushConnection.java +++ b/client/src/com/vaadin/client/communication/PushConnection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -102,4 +102,4 @@ public interface PushConnection { */ public String getTransportType(); -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/communication/RpcManager.java b/client/src/com/vaadin/client/communication/RpcManager.java index 852f854541..7b706fca2d 100644 --- a/client/src/com/vaadin/client/communication/RpcManager.java +++ b/client/src/com/vaadin/client/communication/RpcManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/RpcProxy.java b/client/src/com/vaadin/client/communication/RpcProxy.java index 1ad8a5eae0..31b5c92707 100644 --- a/client/src/com/vaadin/client/communication/RpcProxy.java +++ b/client/src/com/vaadin/client/communication/RpcProxy.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/StateChangeEvent.java b/client/src/com/vaadin/client/communication/StateChangeEvent.java index e8fd95e818..6bda41cef2 100644 --- a/client/src/com/vaadin/client/communication/StateChangeEvent.java +++ b/client/src/com/vaadin/client/communication/StateChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/communication/URLReference_Serializer.java b/client/src/com/vaadin/client/communication/URLReference_Serializer.java index 64ce1184a8..586dd626f0 100644 --- a/client/src/com/vaadin/client/communication/URLReference_Serializer.java +++ b/client/src/com/vaadin/client/communication/URLReference_Serializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/componentlocator/ComponentLocator.java b/client/src/com/vaadin/client/componentlocator/ComponentLocator.java index f0b76766a7..c1ddc02aae 100644 --- a/client/src/com/vaadin/client/componentlocator/ComponentLocator.java +++ b/client/src/com/vaadin/client/componentlocator/ComponentLocator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java b/client/src/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java index 232433273f..5df9854038 100644 --- a/client/src/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java +++ b/client/src/com/vaadin/client/componentlocator/LegacyLocatorStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/componentlocator/LocatorStrategy.java b/client/src/com/vaadin/client/componentlocator/LocatorStrategy.java index 6b3103c677..6eb732bf46 100644 --- a/client/src/com/vaadin/client/componentlocator/LocatorStrategy.java +++ b/client/src/com/vaadin/client/componentlocator/LocatorStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/componentlocator/LocatorUtil.java b/client/src/com/vaadin/client/componentlocator/LocatorUtil.java index 04624920a9..1d1c06587b 100644 --- a/client/src/com/vaadin/client/componentlocator/LocatorUtil.java +++ b/client/src/com/vaadin/client/componentlocator/LocatorUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/componentlocator/SelectorPredicate.java b/client/src/com/vaadin/client/componentlocator/SelectorPredicate.java index 32b33005ed..31f6cc9b05 100644 --- a/client/src/com/vaadin/client/componentlocator/SelectorPredicate.java +++ b/client/src/com/vaadin/client/componentlocator/SelectorPredicate.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java b/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java index e7e752ef34..6075d1bf48 100644 --- a/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java +++ b/client/src/com/vaadin/client/componentlocator/VaadinFinderLocatorStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/AnalyzeLayoutsPanel.java b/client/src/com/vaadin/client/debug/internal/AnalyzeLayoutsPanel.java index 7561bc2c03..1238d88345 100644 --- a/client/src/com/vaadin/client/debug/internal/AnalyzeLayoutsPanel.java +++ b/client/src/com/vaadin/client/debug/internal/AnalyzeLayoutsPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/ConnectorInfoPanel.java b/client/src/com/vaadin/client/debug/internal/ConnectorInfoPanel.java index fc7b55497e..0b49fa7aaf 100644 --- a/client/src/com/vaadin/client/debug/internal/ConnectorInfoPanel.java +++ b/client/src/com/vaadin/client/debug/internal/ConnectorInfoPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/DebugButton.java b/client/src/com/vaadin/client/debug/internal/DebugButton.java index a49a392fbe..f797197afb 100644 --- a/client/src/com/vaadin/client/debug/internal/DebugButton.java +++ b/client/src/com/vaadin/client/debug/internal/DebugButton.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/ErrorNotificationHandler.java b/client/src/com/vaadin/client/debug/internal/ErrorNotificationHandler.java index 0e4c57494b..f4fbe12c0d 100644 --- a/client/src/com/vaadin/client/debug/internal/ErrorNotificationHandler.java +++ b/client/src/com/vaadin/client/debug/internal/ErrorNotificationHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -83,4 +83,4 @@ public class ErrorNotificationHandler extends Handler { public void flush() { // Nothing todo } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/debug/internal/HierarchyPanel.java b/client/src/com/vaadin/client/debug/internal/HierarchyPanel.java index 755f076b7a..c5c134fc31 100644 --- a/client/src/com/vaadin/client/debug/internal/HierarchyPanel.java +++ b/client/src/com/vaadin/client/debug/internal/HierarchyPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/HierarchySection.java b/client/src/com/vaadin/client/debug/internal/HierarchySection.java index 1647a61256..1eacf286e8 100644 --- a/client/src/com/vaadin/client/debug/internal/HierarchySection.java +++ b/client/src/com/vaadin/client/debug/internal/HierarchySection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/Highlight.java b/client/src/com/vaadin/client/debug/internal/Highlight.java index 262313b9b3..e91f4abcbb 100644 --- a/client/src/com/vaadin/client/debug/internal/Highlight.java +++ b/client/src/com/vaadin/client/debug/internal/Highlight.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/Icon.java b/client/src/com/vaadin/client/debug/internal/Icon.java index 70bac11175..d05eca2f6f 100644 --- a/client/src/com/vaadin/client/debug/internal/Icon.java +++ b/client/src/com/vaadin/client/debug/internal/Icon.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/InfoSection.java b/client/src/com/vaadin/client/debug/internal/InfoSection.java index 38d7290fde..23b77a94db 100644 --- a/client/src/com/vaadin/client/debug/internal/InfoSection.java +++ b/client/src/com/vaadin/client/debug/internal/InfoSection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/LogSection.java b/client/src/com/vaadin/client/debug/internal/LogSection.java index f792ec95be..30abb4fff9 100644 --- a/client/src/com/vaadin/client/debug/internal/LogSection.java +++ b/client/src/com/vaadin/client/debug/internal/LogSection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -358,4 +358,4 @@ public class LogSection implements Section { addRow(Level.FINE, "UIDL: " + uidl.toSource()); } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/debug/internal/NetworkSection.java b/client/src/com/vaadin/client/debug/internal/NetworkSection.java index a1cb8138ef..5b0579238f 100644 --- a/client/src/com/vaadin/client/debug/internal/NetworkSection.java +++ b/client/src/com/vaadin/client/debug/internal/NetworkSection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/OptimizedWidgetsetPanel.java b/client/src/com/vaadin/client/debug/internal/OptimizedWidgetsetPanel.java index a8d8aad888..0db8ad91a4 100644 --- a/client/src/com/vaadin/client/debug/internal/OptimizedWidgetsetPanel.java +++ b/client/src/com/vaadin/client/debug/internal/OptimizedWidgetsetPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/ProfilerSection.java b/client/src/com/vaadin/client/debug/internal/ProfilerSection.java index 4a2a3a1c38..c4fea5cf71 100644 --- a/client/src/com/vaadin/client/debug/internal/ProfilerSection.java +++ b/client/src/com/vaadin/client/debug/internal/ProfilerSection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/Section.java b/client/src/com/vaadin/client/debug/internal/Section.java index c6b8af55e8..876b9bbc27 100644 --- a/client/src/com/vaadin/client/debug/internal/Section.java +++ b/client/src/com/vaadin/client/debug/internal/Section.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -73,4 +73,4 @@ public interface Section { public void meta(ApplicationConnection ac, ValueMap meta); public void uidl(ApplicationConnection ac, ValueMap uidl); -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/debug/internal/SelectConnectorListener.java b/client/src/com/vaadin/client/debug/internal/SelectConnectorListener.java index ec3a36c7c4..c3652c78e8 100644 --- a/client/src/com/vaadin/client/debug/internal/SelectConnectorListener.java +++ b/client/src/com/vaadin/client/debug/internal/SelectConnectorListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -35,4 +35,4 @@ public interface SelectConnectorListener { */ public void select(ServerConnector connector, Element element); -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/debug/internal/SelectorPath.java b/client/src/com/vaadin/client/debug/internal/SelectorPath.java index 56b48b2447..5627bf0250 100644 --- a/client/src/com/vaadin/client/debug/internal/SelectorPath.java +++ b/client/src/com/vaadin/client/debug/internal/SelectorPath.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -265,4 +265,4 @@ public class SelectorPath { } return name; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/debug/internal/TestBenchSection.java b/client/src/com/vaadin/client/debug/internal/TestBenchSection.java index d35c575568..355565f706 100644 --- a/client/src/com/vaadin/client/debug/internal/TestBenchSection.java +++ b/client/src/com/vaadin/client/debug/internal/TestBenchSection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/debug/internal/VDebugWindow.java b/client/src/com/vaadin/client/debug/internal/VDebugWindow.java index 5e146ffda8..3393d7371b 100644 --- a/client/src/com/vaadin/client/debug/internal/VDebugWindow.java +++ b/client/src/com/vaadin/client/debug/internal/VDebugWindow.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/event/PointerCancelEvent.java b/client/src/com/vaadin/client/event/PointerCancelEvent.java new file mode 100644 index 0000000000..906a07b120 --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerCancelEvent.java @@ -0,0 +1,62 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.google.gwt.event.dom.client.DomEvent; + +/** + * Represents a native PointerCancelEvent. + * + * @since 7.2 + */ +public class PointerCancelEvent extends PointerEvent<PointerCancelHandler> { + + /** + * Event type for PointerCancelEvent. Represents the meta-data associated + * with this event. + */ + private static final Type<PointerCancelHandler> TYPE = new Type<PointerCancelHandler>( + EventType.PointerCancel.getNativeEventName(), + new PointerCancelEvent()); + + /** + * Gets the event type associated with pointer cancel events. + * + * @return the handler type + */ + public static Type<PointerCancelHandler> getType() { + return TYPE; + } + + /** + * Protected constructor, use + * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} + * to fire pointer up events. + */ + protected PointerCancelEvent() { + } + + @Override + public final Type<PointerCancelHandler> getAssociatedType() { + return TYPE; + } + + @Override + protected void dispatch(PointerCancelHandler handler) { + handler.onPointerCancel(this); + } + +} diff --git a/client/src/com/vaadin/client/event/PointerCancelHandler.java b/client/src/com/vaadin/client/event/PointerCancelHandler.java new file mode 100644 index 0000000000..fa2210b73c --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerCancelHandler.java @@ -0,0 +1,34 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.google.gwt.event.shared.EventHandler; + +/** + * Handler interface for {@link PointerCancelEvent} events. + * + * @since 7.2 + */ +public interface PointerCancelHandler extends EventHandler { + + /** + * Called when PointerCancelEvent is fired. + * + * @param event + * the {@link PointerCancelEvent} that was fired + */ + void onPointerCancel(PointerCancelEvent event); +} diff --git a/client/src/com/vaadin/client/event/PointerDownEvent.java b/client/src/com/vaadin/client/event/PointerDownEvent.java new file mode 100644 index 0000000000..eeae9891f2 --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerDownEvent.java @@ -0,0 +1,61 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.google.gwt.event.dom.client.DomEvent; + +/** + * Represents a native PointerDownEvent. + * + * @since 7.2 + */ +public class PointerDownEvent extends PointerEvent<PointerDownHandler> { + + /** + * Event type for PointerDownEvent. Represents the meta-data associated with + * this event. + */ + private static final Type<PointerDownHandler> TYPE = new Type<PointerDownHandler>( + EventType.PointerDown.getNativeEventName(), new PointerDownEvent()); + + /** + * Gets the event type associated with PointerDownEvent events. + * + * @return the handler type + */ + public static Type<PointerDownHandler> getType() { + return TYPE; + } + + /** + * Protected constructor, use + * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} + * to fire pointer down events. + */ + protected PointerDownEvent() { + } + + @Override + public final Type<PointerDownHandler> getAssociatedType() { + return TYPE; + } + + @Override + protected void dispatch(PointerDownHandler handler) { + handler.onPointerDown(this); + } + +} diff --git a/client/src/com/vaadin/client/event/PointerDownHandler.java b/client/src/com/vaadin/client/event/PointerDownHandler.java new file mode 100644 index 0000000000..dfd9a358eb --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerDownHandler.java @@ -0,0 +1,34 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.google.gwt.event.shared.EventHandler; + +/** + * Handler interface for {@link PointerDownEvent} events. + * + * @since 7.2 + */ +public interface PointerDownHandler extends EventHandler { + + /** + * Called when PointerDownEvent is fired. + * + * @param event + * the {@link PointerDownEvent} that was fired + */ + void onPointerDown(PointerDownEvent event); +} diff --git a/client/src/com/vaadin/client/event/PointerEvent.java b/client/src/com/vaadin/client/event/PointerEvent.java new file mode 100644 index 0000000000..71e73f945c --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerEvent.java @@ -0,0 +1,173 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.google.gwt.dom.client.NativeEvent; +import com.google.gwt.event.dom.client.MouseEvent; +import com.google.gwt.event.shared.EventHandler; + +/** + * Abstract class representing Pointer events. + * + * @param <H> + * handler type + * + * @since 7.2 + */ +public abstract class PointerEvent<H extends EventHandler> extends + MouseEvent<H> { + + enum EventType { + PointerDown, PointerMove, PointerOut, PointerOver, PointerUp, PointerCancel; + + String getNativeEventName() { + return PointerEventSupport.getNativeEventName(this); + } + } + + public static final String TYPE_UNKNOWN = ""; + public static final String TYPE_TOUCH = "touch"; + public static final String TYPE_PEN = "pen"; + public static final String TYPE_MOUSE = "mouse"; + + /** + * Gets a unique identifier for the pointer that caused this event. The + * identifiers of previously active but retired pointers may be recycled. + * + * @return unique pointer id + */ + public final int getPointerId() { + return getPointerId(getNativeEvent()); + } + + /** + * Gets the width of the contact geometry of the pointer in CSS pixels. + * + * @return width in CSS pixels + */ + public final int getWidth() { + return getWidth(getNativeEvent()); + } + + /** + * Gets the height of the contact geometry of the pointer in CSS pixels. + * + * @return height in CSS pixels. + */ + public final int getHeight() { + return getHeight(getNativeEvent()); + } + + /** + * Gets the pressure of the pointer input as a value in the range of [0, 1] + * where 0 and 1 represent the minimum and maximum, respectively. + * + * @return input pressure as a value between 0 and 1 + */ + public final double getPressure() { + return getPressure(getNativeEvent()); + } + + /** + * Gets the angle between the Y-Z plane and the plane containing both the + * transducer and the Y axis. A positive tilt is to the right. + * + * @return the tilt along the X axis as degrees in the range of [-90, 90], + * or 0 if the device does not support tilt + */ + public final double getTiltX() { + return getTiltX(getNativeEvent()); + } + + /** + * Gets the angle between the X-Z plane and the plane containing both the + * transducer and the X axis. A positive tilt is towards the user. + * + * @return the tilt along the Y axis as degrees in the range of [-90, 90], + * or 0 if the device does not support tilt + */ + public final double getTiltY() { + return getTiltY(getNativeEvent()); + } + + /** + * Gets the type of the pointer device that caused this event. + * + * @see PointerEvent#TYPE_UNKNOWN + * @see PointerEvent#TYPE_TOUCH + * @see PointerEvent#TYPE_PEN + * @see PointerEvent#TYPE_MOUSE + * + * @return a String indicating the type of the pointer device + */ + public final String getPointerType() { + return getPointerType(getNativeEvent()); + } + + /** + * Indicates whether the pointer is the primary pointer of this type. + * + * @return true if the pointer is the primary pointer, otherwise false + */ + public final boolean isPrimary() { + return isPrimary(getNativeEvent()); + } + + private static native final int getPointerId(NativeEvent e) + /*-{ + return e.pointerId; + }-*/; + + private static native final int getWidth(NativeEvent e) + /*-{ + return e.width; + }-*/; + + private static native final int getHeight(NativeEvent e) + /*-{ + return e.height; + }-*/; + + private static native final double getPressure(NativeEvent e) + /*-{ + return e.pressure; + }-*/; + + private static native final double getTiltX(NativeEvent e) + /*-{ + return e.tiltX; + }-*/; + + private static native final double getTiltY(NativeEvent e) + /*-{ + return e.tiltY; + }-*/; + + private static native final String getPointerType(NativeEvent e) + /*-{ + var pointerType = e.pointerType; + if (typeof pointerType === "number") { + pointerType = [ , , "touch", "pen", "mouse" ][pointerType]; + } + return pointerType || ""; + }-*/; + + private static native final boolean isPrimary(NativeEvent e) + /*-{ + return e.isPrimary; + }-*/; + +} diff --git a/client/src/com/vaadin/client/event/PointerEventSupport.java b/client/src/com/vaadin/client/event/PointerEventSupport.java new file mode 100644 index 0000000000..99d73745c5 --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerEventSupport.java @@ -0,0 +1,55 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.google.gwt.core.client.GWT; +import com.vaadin.client.event.PointerEvent.EventType; + +/** + * Main class for pointer event support. Contains functionality for determining + * if pointer events are available or not. + * + * @since 7.2 + * @author Vaadin Ltd + */ +public class PointerEventSupport { + + private static final PointerEventSupportImpl impl = GWT + .create(PointerEventSupportImpl.class); + + private PointerEventSupport() { + } + + public static void init() { + impl.init(); + } + + /** + * @return true if pointer events are supported by the browser, false + * otherwise + */ + public static boolean isSupported() { + return impl.isSupported(); + } + + /** + * @param eventType + * @return the native event name of the given event + */ + public static String getNativeEventName(EventType eventType) { + return impl.getNativeEventName(eventType); + } +} diff --git a/client/src/com/vaadin/client/event/PointerEventSupportImpl.java b/client/src/com/vaadin/client/event/PointerEventSupportImpl.java new file mode 100644 index 0000000000..7605104ade --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerEventSupportImpl.java @@ -0,0 +1,51 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.vaadin.client.event.PointerEvent.EventType; + +/** + * Main pointer event support implementation class. Made for browser without + * pointer event support. + * + * @since 7.2 + * @author Vaadin Ltd + */ +public class PointerEventSupportImpl { + + /** + * @return true if the pointer events are supported, false otherwise + */ + protected boolean isSupported() { + return false; + } + + /** + * @param events + * @return the native event name of the given event + */ + public String getNativeEventName(EventType eventName) { + return eventName.toString().toLowerCase(); + } + + /** + * Initializes event support + */ + protected void init() { + + } + +} diff --git a/client/src/com/vaadin/client/event/PointerEventSupportImplIE10.java b/client/src/com/vaadin/client/event/PointerEventSupportImplIE10.java new file mode 100644 index 0000000000..1de2f9722f --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerEventSupportImplIE10.java @@ -0,0 +1,34 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.vaadin.client.event.PointerEvent.EventType; + +/** + * Pointer event support class for IE 10 ("ms" prefixed pointer events) + * + * @since 7.2 + * @author Vaadin Ltd + */ +public class PointerEventSupportImplIE10 extends + PointerEventSupportImplModernIE { + + @Override + public String getNativeEventName(EventType eventName) { + return "MS" + eventName; + } + +} diff --git a/client/src/com/vaadin/client/event/PointerEventSupportImplModernIE.java b/client/src/com/vaadin/client/event/PointerEventSupportImplModernIE.java new file mode 100644 index 0000000000..851c600bcb --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerEventSupportImplModernIE.java @@ -0,0 +1,72 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.google.gwt.core.client.JavaScriptObject; +import com.google.gwt.user.client.impl.DOMImplStandard; +import com.vaadin.client.event.PointerEvent.EventType; + +/** + * Pointer event support class for IE 11+ (unprefixed pointer events) + * + * @since 7.2 + * @author Vaadin Ltd + */ + +public class PointerEventSupportImplModernIE extends PointerEventSupportImpl { + + protected static boolean inited = false; + + @Override + protected boolean isSupported() { + return true; + } + + @Override + protected void init() { + if (!inited) { + JavaScriptObject eventDispatcherMapExtensions = JavaScriptObject + .createObject(); + JavaScriptObject captureEventDispatcherMapExtensions = JavaScriptObject + .createObject(); + for (EventType e : EventType.values()) { + addEventDispatcher(e.getNativeEventName(), + eventDispatcherMapExtensions); + getPointerEventCaptureDispatchers(e.getNativeEventName(), + captureEventDispatcherMapExtensions); + } + DOMImplStandard + .addBitlessEventDispatchers(eventDispatcherMapExtensions); + DOMImplStandard + .addCaptureEventDispatchers(captureEventDispatcherMapExtensions); + + inited = true; + } + } + + private static native void addEventDispatcher(String eventName, + JavaScriptObject jso) + /*-{ + jso[eventName] = @com.google.gwt.user.client.impl.DOMImplStandard::dispatchEvent(*); + }-*/; + + private static native void getPointerEventCaptureDispatchers( + String eventName, JavaScriptObject jso) + /*-{ + jso[eventName] = @com.google.gwt.user.client.impl.DOMImplStandard::dispatchCapturedMouseEvent(*); + }-*/; + +} diff --git a/client/src/com/vaadin/client/event/PointerMoveEvent.java b/client/src/com/vaadin/client/event/PointerMoveEvent.java new file mode 100644 index 0000000000..6a4a81e17d --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerMoveEvent.java @@ -0,0 +1,61 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.google.gwt.event.dom.client.DomEvent; + +/** + * Represents a native PointerMoveEvent event. + * + * @since 7.2 + */ +public class PointerMoveEvent extends PointerEvent<PointerMoveHandler> { + + /** + * Event type for PointerMoveEvent. Represents the meta-data associated with + * this event. + */ + private static final Type<PointerMoveHandler> TYPE = new Type<PointerMoveHandler>( + EventType.PointerMove.getNativeEventName(), new PointerMoveEvent()); + + /** + * Gets the event type associated with PointerMoveEvent. + * + * @return the handler type + */ + public static Type<PointerMoveHandler> getType() { + return TYPE; + } + + /** + * Protected constructor, use + * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} + * to fire pointer down events. + */ + protected PointerMoveEvent() { + } + + @Override + public final Type<PointerMoveHandler> getAssociatedType() { + return TYPE; + } + + @Override + protected void dispatch(PointerMoveHandler handler) { + handler.onPointerMove(this); + } + +} diff --git a/client/src/com/vaadin/client/event/PointerMoveHandler.java b/client/src/com/vaadin/client/event/PointerMoveHandler.java new file mode 100644 index 0000000000..ad6a93da8d --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerMoveHandler.java @@ -0,0 +1,34 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.google.gwt.event.shared.EventHandler; + +/** + * Handler interface for {@link PointerMoveEvent} events. + * + * @since 7.2 + */ +public interface PointerMoveHandler extends EventHandler { + + /** + * Called when PointerMoveEvent is fired. + * + * @param event + * the {@link PointerMoveEvent} that was fired + */ + void onPointerMove(PointerMoveEvent event); +} diff --git a/client/src/com/vaadin/client/event/PointerUpEvent.java b/client/src/com/vaadin/client/event/PointerUpEvent.java new file mode 100644 index 0000000000..005902d7f7 --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerUpEvent.java @@ -0,0 +1,61 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.google.gwt.event.dom.client.DomEvent; + +/** + * Represents a native PointerUpEvent. + * + * @since 7.2 + */ +public class PointerUpEvent extends PointerEvent<PointerUpHandler> { + + /** + * Event type for PointerUpEvent. Represents the meta-data associated with + * this event. + */ + private static final Type<PointerUpHandler> TYPE = new Type<PointerUpHandler>( + EventType.PointerUp.getNativeEventName(), new PointerUpEvent()); + + /** + * Gets the event type associated with PointerUpEvent. + * + * @return the handler type + */ + public static Type<PointerUpHandler> getType() { + return TYPE; + } + + /** + * Protected constructor, use + * {@link DomEvent#fireNativeEvent(com.google.gwt.dom.client.NativeEvent, com.google.gwt.event.shared.HasHandlers)} + * to fire pointer down events. + */ + protected PointerUpEvent() { + } + + @Override + public final Type<PointerUpHandler> getAssociatedType() { + return TYPE; + } + + @Override + protected void dispatch(PointerUpHandler handler) { + handler.onPointerUp(this); + } + +} diff --git a/client/src/com/vaadin/client/event/PointerUpHandler.java b/client/src/com/vaadin/client/event/PointerUpHandler.java new file mode 100644 index 0000000000..587b249634 --- /dev/null +++ b/client/src/com/vaadin/client/event/PointerUpHandler.java @@ -0,0 +1,34 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.event; + +import com.google.gwt.event.shared.EventHandler; + +/** + * Handler interface for {@link PointerUpEvent} events. + * + * @since 7.2 + */ +public interface PointerUpHandler extends EventHandler { + + /** + * Called when PointerUpEvent is fired. + * + * @param event + * the {@link PointerUpEvent} that was fired + */ + void onPointerUp(PointerUpEvent event); +} diff --git a/client/src/com/vaadin/client/extensions/AbstractExtensionConnector.java b/client/src/com/vaadin/client/extensions/AbstractExtensionConnector.java index 4aa1ec0e65..79eaa2f8b9 100644 --- a/client/src/com/vaadin/client/extensions/AbstractExtensionConnector.java +++ b/client/src/com/vaadin/client/extensions/AbstractExtensionConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/extensions/BrowserWindowOpenerConnector.java b/client/src/com/vaadin/client/extensions/BrowserWindowOpenerConnector.java index a4e9b41a52..58457c1b7b 100644 --- a/client/src/com/vaadin/client/extensions/BrowserWindowOpenerConnector.java +++ b/client/src/com/vaadin/client/extensions/BrowserWindowOpenerConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/extensions/FileDownloaderConnector.java b/client/src/com/vaadin/client/extensions/FileDownloaderConnector.java index 981d6be982..66fc30575b 100644 --- a/client/src/com/vaadin/client/extensions/FileDownloaderConnector.java +++ b/client/src/com/vaadin/client/extensions/FileDownloaderConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/extensions/ResponsiveConnector.java b/client/src/com/vaadin/client/extensions/ResponsiveConnector.java index 500e4a0916..b2230a4846 100644 --- a/client/src/com/vaadin/client/extensions/ResponsiveConnector.java +++ b/client/src/com/vaadin/client/extensions/ResponsiveConnector.java @@ -1,12 +1,12 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -100,13 +100,13 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements * @return The selectors in a comma delimited string. */ protected String constructSelectorsForTarget() { - String primaryStyle = this.target.getState().primaryStyleName; + String primaryStyle = target.getState().primaryStyleName; StringBuilder selectors = new StringBuilder(); selectors.append(".").append(primaryStyle); - if (this.target.getState().styles != null - && this.target.getState().styles.size() > 0) { - for (String style : this.target.getState().styles) { + if (target.getState().styles != null + && target.getState().styles.size() > 0) { + for (String style : target.getState().styles) { selectors.append(",.").append(style); selectors.append(",.").append(primaryStyle).append(".") .append(style); @@ -118,8 +118,8 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements } // Allow the ID to be used as the selector as well for ranges - if (this.target.getState().id != null) { - selectors.append(",#").append(this.target.getState().id); + if (target.getState().id != null) { + selectors.append(",#").append(target.getState().id); } return selectors.toString(); } @@ -128,7 +128,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements public void onUnregister() { super.onUnregister(); LayoutManager.get(getConnection()).removeElementResizeListener( - this.target.getWidget().getElement(), this); + target.getWidget().getElement(), this); } /** @@ -314,7 +314,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements int height = event.getLayoutManager() .getOuterHeight(event.getElement()); - com.google.gwt.user.client.Element element = this.target.getWidget() + com.google.gwt.user.client.Element element = target.getWidget() .getElement(); boolean forceRedraw = false; @@ -323,7 +323,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements event.getElement()); if (!"".equals(currentWidthRanges)) { - this.target.getWidget().getElement() + target.getWidget().getElement() .setAttribute("width-range", currentWidthRanges); forceRedraw = true; } else { @@ -335,7 +335,7 @@ public class ResponsiveConnector extends AbstractExtensionConnector implements event.getElement()); if (!"".equals(currentHeightRanges)) { - this.target.getWidget().getElement() + target.getWidget().getElement() .setAttribute("height-range", currentHeightRanges); forceRedraw = true; } else { diff --git a/client/src/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java b/client/src/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java index 8e6ad25407..f76f5058c5 100644 --- a/client/src/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java +++ b/client/src/com/vaadin/client/extensions/javascriptmanager/JavaScriptManagerConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/AsyncBundleLoader.java b/client/src/com/vaadin/client/metadata/AsyncBundleLoader.java index 6be89c9cc9..9b7f611281 100644 --- a/client/src/com/vaadin/client/metadata/AsyncBundleLoader.java +++ b/client/src/com/vaadin/client/metadata/AsyncBundleLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/BundleLoadCallback.java b/client/src/com/vaadin/client/metadata/BundleLoadCallback.java index 66a58aed72..399ac87d4e 100644 --- a/client/src/com/vaadin/client/metadata/BundleLoadCallback.java +++ b/client/src/com/vaadin/client/metadata/BundleLoadCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/ConnectorBundleLoader.java b/client/src/com/vaadin/client/metadata/ConnectorBundleLoader.java index 8148010b54..7d2078061e 100644 --- a/client/src/com/vaadin/client/metadata/ConnectorBundleLoader.java +++ b/client/src/com/vaadin/client/metadata/ConnectorBundleLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/InvokationHandler.java b/client/src/com/vaadin/client/metadata/InvokationHandler.java index 4d1a3caa94..4faf0a1484 100644 --- a/client/src/com/vaadin/client/metadata/InvokationHandler.java +++ b/client/src/com/vaadin/client/metadata/InvokationHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/Invoker.java b/client/src/com/vaadin/client/metadata/Invoker.java index 3639b4a1e7..6e263829c0 100644 --- a/client/src/com/vaadin/client/metadata/Invoker.java +++ b/client/src/com/vaadin/client/metadata/Invoker.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/JsniInvoker.java b/client/src/com/vaadin/client/metadata/JsniInvoker.java index 4692a18cfe..d6a60c89f3 100644 --- a/client/src/com/vaadin/client/metadata/JsniInvoker.java +++ b/client/src/com/vaadin/client/metadata/JsniInvoker.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/Method.java b/client/src/com/vaadin/client/metadata/Method.java index 390574cdf8..d6b474fabc 100644 --- a/client/src/com/vaadin/client/metadata/Method.java +++ b/client/src/com/vaadin/client/metadata/Method.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/NoDataException.java b/client/src/com/vaadin/client/metadata/NoDataException.java index 921b0a5b4e..45ea67d017 100644 --- a/client/src/com/vaadin/client/metadata/NoDataException.java +++ b/client/src/com/vaadin/client/metadata/NoDataException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/OnStateChangeMethod.java b/client/src/com/vaadin/client/metadata/OnStateChangeMethod.java index 2ba06fd4eb..47749fcd52 100644 --- a/client/src/com/vaadin/client/metadata/OnStateChangeMethod.java +++ b/client/src/com/vaadin/client/metadata/OnStateChangeMethod.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/Property.java b/client/src/com/vaadin/client/metadata/Property.java index 72ed7fec41..f421a5525b 100644 --- a/client/src/com/vaadin/client/metadata/Property.java +++ b/client/src/com/vaadin/client/metadata/Property.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/ProxyHandler.java b/client/src/com/vaadin/client/metadata/ProxyHandler.java index 3057a7c287..6fba8a8155 100644 --- a/client/src/com/vaadin/client/metadata/ProxyHandler.java +++ b/client/src/com/vaadin/client/metadata/ProxyHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/Type.java b/client/src/com/vaadin/client/metadata/Type.java index c09dffa638..cc185dff96 100644 --- a/client/src/com/vaadin/client/metadata/Type.java +++ b/client/src/com/vaadin/client/metadata/Type.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/TypeData.java b/client/src/com/vaadin/client/metadata/TypeData.java index 08f653f371..9addc4ffb2 100644 --- a/client/src/com/vaadin/client/metadata/TypeData.java +++ b/client/src/com/vaadin/client/metadata/TypeData.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/metadata/TypeDataStore.java b/client/src/com/vaadin/client/metadata/TypeDataStore.java index bc6610a6ff..7aa952d0f2 100644 --- a/client/src/com/vaadin/client/metadata/TypeDataStore.java +++ b/client/src/com/vaadin/client/metadata/TypeDataStore.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/AbstractClickEventHandler.java b/client/src/com/vaadin/client/ui/AbstractClickEventHandler.java index 32c10fac49..c08656c4d9 100644 --- a/client/src/com/vaadin/client/ui/AbstractClickEventHandler.java +++ b/client/src/com/vaadin/client/ui/AbstractClickEventHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -242,4 +242,4 @@ public abstract class AbstractClickEventHandler implements MouseDownHandler, return connector.getWidget().getElement(); } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java index f6c26cda05..ccf070698b 100644 --- a/client/src/com/vaadin/client/ui/AbstractComponentConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractComponentConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -217,11 +217,24 @@ public abstract class AbstractComponentConnector extends AbstractConnector } + /** + * Updates the component size based on the shared state, invoking the + * {@link LayoutManager layout manager} if necessary. + */ protected void updateComponentSize() { updateComponentSize(getState().width == null ? "" : getState().width, getState().height == null ? "" : getState().height); } + /** + * Updates the component size, invoking the {@link LayoutManager layout + * manager} if necessary. + * + * @param newWidth + * The new width as a CSS string. Cannot be null. + * @param newHeight + * The new height as a CSS string. Cannot be null. + */ protected void updateComponentSize(String newWidth, String newHeight) { Profiler.enter("AbstractComponentConnector.updateComponentSize"); @@ -255,13 +268,26 @@ public abstract class AbstractComponentConnector extends AbstractConnector Profiler.leave("AbstractComponentConnector.updateComponentSize update styleNames"); Profiler.enter("AbstractComponentConnector.updateComponentSize update DOM"); - widget.setHeight(newHeight); - widget.setWidth(newWidth); + updateWidgetSize(newWidth, newHeight); Profiler.leave("AbstractComponentConnector.updateComponentSize update DOM"); Profiler.leave("AbstractComponentConnector.updateComponentSize"); } + /** + * Updates the DOM size of this connector's {@link #getWidget() widget}. + * + * @since 7.1.15 + * @param newWidth + * The new width as a CSS string. Cannot be null. + * @param newHeight + * The new height as a CSS string. Cannot be null. + */ + protected void updateWidgetSize(String newWidth, String newHeight) { + getWidget().setWidth(newWidth); + getWidget().setHeight(newHeight); + } + @Override public boolean isRelativeHeight() { return ComponentStateUtil.isRelativeHeight(getState()); diff --git a/client/src/com/vaadin/client/ui/AbstractComponentContainerConnector.java b/client/src/com/vaadin/client/ui/AbstractComponentContainerConnector.java index e1b4e720f9..f808fb194c 100644 --- a/client/src/com/vaadin/client/ui/AbstractComponentContainerConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractComponentContainerConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/AbstractConnector.java b/client/src/com/vaadin/client/ui/AbstractConnector.java index bd499ac4bc..a2e0d9cd54 100644 --- a/client/src/com/vaadin/client/ui/AbstractConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/AbstractFieldConnector.java b/client/src/com/vaadin/client/ui/AbstractFieldConnector.java index b435c28b92..a3c3779eb6 100644 --- a/client/src/com/vaadin/client/ui/AbstractFieldConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractFieldConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/AbstractHasComponentsConnector.java b/client/src/com/vaadin/client/ui/AbstractHasComponentsConnector.java index d833f076e4..27210de10d 100644 --- a/client/src/com/vaadin/client/ui/AbstractHasComponentsConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractHasComponentsConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/AbstractLayoutConnector.java b/client/src/com/vaadin/client/ui/AbstractLayoutConnector.java index 4939d824a9..6e1dde3863 100644 --- a/client/src/com/vaadin/client/ui/AbstractLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractLayoutConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/AbstractSingleComponentContainerConnector.java b/client/src/com/vaadin/client/ui/AbstractSingleComponentContainerConnector.java index 07fec98189..954803b64c 100644 --- a/client/src/com/vaadin/client/ui/AbstractSingleComponentContainerConnector.java +++ b/client/src/com/vaadin/client/ui/AbstractSingleComponentContainerConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/Action.java b/client/src/com/vaadin/client/ui/Action.java index 84399f7611..d7593740d6 100644 --- a/client/src/com/vaadin/client/ui/Action.java +++ b/client/src/com/vaadin/client/ui/Action.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/ActionOwner.java b/client/src/com/vaadin/client/ui/ActionOwner.java index 0d95072714..73c3675438 100644 --- a/client/src/com/vaadin/client/ui/ActionOwner.java +++ b/client/src/com/vaadin/client/ui/ActionOwner.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/CalendarEntry.java b/client/src/com/vaadin/client/ui/CalendarEntry.java index 196739694a..8050f0aab1 100644 --- a/client/src/com/vaadin/client/ui/CalendarEntry.java +++ b/client/src/com/vaadin/client/ui/CalendarEntry.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -137,4 +137,4 @@ public class CalendarEntry { return s; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/ClickEventHandler.java b/client/src/com/vaadin/client/ui/ClickEventHandler.java index 668b2aa131..7947e0560c 100644 --- a/client/src/com/vaadin/client/ui/ClickEventHandler.java +++ b/client/src/com/vaadin/client/ui/ClickEventHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -59,4 +59,4 @@ public abstract class ClickEventHandler extends AbstractClickEventHandler { protected abstract void fireClick(NativeEvent event, MouseEventDetails mouseDetails); -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/Field.java b/client/src/com/vaadin/client/ui/Field.java index 987d3e1c3f..99bfe107b3 100644 --- a/client/src/com/vaadin/client/ui/Field.java +++ b/client/src/com/vaadin/client/ui/Field.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/FocusElementPanel.java b/client/src/com/vaadin/client/ui/FocusElementPanel.java index dd5544f016..d0ddca0935 100644 --- a/client/src/com/vaadin/client/ui/FocusElementPanel.java +++ b/client/src/com/vaadin/client/ui/FocusElementPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/FocusUtil.java b/client/src/com/vaadin/client/ui/FocusUtil.java index 8de3f767bd..4750b89173 100644 --- a/client/src/com/vaadin/client/ui/FocusUtil.java +++ b/client/src/com/vaadin/client/ui/FocusUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/FocusableFlexTable.java b/client/src/com/vaadin/client/ui/FocusableFlexTable.java index ff453061c4..8deec2babb 100644 --- a/client/src/com/vaadin/client/ui/FocusableFlexTable.java +++ b/client/src/com/vaadin/client/ui/FocusableFlexTable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/FocusableFlowPanel.java b/client/src/com/vaadin/client/ui/FocusableFlowPanel.java index 931b345698..77a26361ef 100644 --- a/client/src/com/vaadin/client/ui/FocusableFlowPanel.java +++ b/client/src/com/vaadin/client/ui/FocusableFlowPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -114,4 +114,4 @@ public class FocusableFlowPanel extends FlowPanel implements HasFocusHandlers, public void focus() { setFocus(true); } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/FocusableScrollPanel.java b/client/src/com/vaadin/client/ui/FocusableScrollPanel.java index d01ffc00ff..475c8f8074 100644 --- a/client/src/com/vaadin/client/ui/FocusableScrollPanel.java +++ b/client/src/com/vaadin/client/ui/FocusableScrollPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/FontIcon.java b/client/src/com/vaadin/client/ui/FontIcon.java index 04640fab06..74d094a0f2 100644 --- a/client/src/com/vaadin/client/ui/FontIcon.java +++ b/client/src/com/vaadin/client/ui/FontIcon.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/Icon.java b/client/src/com/vaadin/client/ui/Icon.java index 219692161e..277fc2dd5d 100644 --- a/client/src/com/vaadin/client/ui/Icon.java +++ b/client/src/com/vaadin/client/ui/Icon.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/ImageIcon.java b/client/src/com/vaadin/client/ui/ImageIcon.java index 787b0175aa..7174c73637 100644 --- a/client/src/com/vaadin/client/ui/ImageIcon.java +++ b/client/src/com/vaadin/client/ui/ImageIcon.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/JavaScriptComponentConnector.java b/client/src/com/vaadin/client/ui/JavaScriptComponentConnector.java index 3131b757ba..a3a03b597b 100644 --- a/client/src/com/vaadin/client/ui/JavaScriptComponentConnector.java +++ b/client/src/com/vaadin/client/ui/JavaScriptComponentConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/JavaScriptWidget.java b/client/src/com/vaadin/client/ui/JavaScriptWidget.java index 211d652f1e..da9192dace 100644 --- a/client/src/com/vaadin/client/ui/JavaScriptWidget.java +++ b/client/src/com/vaadin/client/ui/JavaScriptWidget.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/LayoutClickEventHandler.java b/client/src/com/vaadin/client/ui/LayoutClickEventHandler.java index af398a1e07..6eccb9cb3b 100644 --- a/client/src/com/vaadin/client/ui/LayoutClickEventHandler.java +++ b/client/src/com/vaadin/client/ui/LayoutClickEventHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/LegacyConnector.java b/client/src/com/vaadin/client/ui/LegacyConnector.java index 8916e9bf4a..35a82cff53 100644 --- a/client/src/com/vaadin/client/ui/LegacyConnector.java +++ b/client/src/com/vaadin/client/ui/LegacyConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/ManagedLayout.java b/client/src/com/vaadin/client/ui/ManagedLayout.java index 0a92c59768..e7266d99b5 100644 --- a/client/src/com/vaadin/client/ui/ManagedLayout.java +++ b/client/src/com/vaadin/client/ui/ManagedLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/MediaBaseConnector.java b/client/src/com/vaadin/client/ui/MediaBaseConnector.java index 8614977be1..cebb2e3836 100644 --- a/client/src/com/vaadin/client/ui/MediaBaseConnector.java +++ b/client/src/com/vaadin/client/ui/MediaBaseConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/PostLayoutListener.java b/client/src/com/vaadin/client/ui/PostLayoutListener.java index 3da2358b0c..bbeb6f1255 100644 --- a/client/src/com/vaadin/client/ui/PostLayoutListener.java +++ b/client/src/com/vaadin/client/ui/PostLayoutListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/ShortcutActionHandler.java b/client/src/com/vaadin/client/ui/ShortcutActionHandler.java index 1ed044ffda..9e9279267d 100644 --- a/client/src/com/vaadin/client/ui/ShortcutActionHandler.java +++ b/client/src/com/vaadin/client/ui/ShortcutActionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/SimpleFocusablePanel.java b/client/src/com/vaadin/client/ui/SimpleFocusablePanel.java index 2678a6168e..f938b2e74f 100644 --- a/client/src/com/vaadin/client/ui/SimpleFocusablePanel.java +++ b/client/src/com/vaadin/client/ui/SimpleFocusablePanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/SimpleManagedLayout.java b/client/src/com/vaadin/client/ui/SimpleManagedLayout.java index 300248810c..e61e2799c4 100644 --- a/client/src/com/vaadin/client/ui/SimpleManagedLayout.java +++ b/client/src/com/vaadin/client/ui/SimpleManagedLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/SubPartAware.java b/client/src/com/vaadin/client/ui/SubPartAware.java index fea8c2dc4a..a064b8a8a8 100644 --- a/client/src/com/vaadin/client/ui/SubPartAware.java +++ b/client/src/com/vaadin/client/ui/SubPartAware.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/TouchScrollDelegate.java b/client/src/com/vaadin/client/ui/TouchScrollDelegate.java index 9d7e435339..f53b32b4e1 100644 --- a/client/src/com/vaadin/client/ui/TouchScrollDelegate.java +++ b/client/src/com/vaadin/client/ui/TouchScrollDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/TreeAction.java b/client/src/com/vaadin/client/ui/TreeAction.java index 8ff7caa0d4..f190ab62d2 100644 --- a/client/src/com/vaadin/client/ui/TreeAction.java +++ b/client/src/com/vaadin/client/ui/TreeAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/UnknownComponentConnector.java b/client/src/com/vaadin/client/ui/UnknownComponentConnector.java index b9b0388d9a..50ded0aeba 100644 --- a/client/src/com/vaadin/client/ui/UnknownComponentConnector.java +++ b/client/src/com/vaadin/client/ui/UnknownComponentConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VAbsoluteLayout.java b/client/src/com/vaadin/client/ui/VAbsoluteLayout.java index bbec8b9e6c..44230288a7 100644 --- a/client/src/com/vaadin/client/ui/VAbsoluteLayout.java +++ b/client/src/com/vaadin/client/ui/VAbsoluteLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VAbstractSplitPanel.java b/client/src/com/vaadin/client/ui/VAbstractSplitPanel.java index a2de144ad2..80a6405d6c 100644 --- a/client/src/com/vaadin/client/ui/VAbstractSplitPanel.java +++ b/client/src/com/vaadin/client/ui/VAbstractSplitPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VAccordion.java b/client/src/com/vaadin/client/ui/VAccordion.java index d348e6863b..1789fa1717 100644 --- a/client/src/com/vaadin/client/ui/VAccordion.java +++ b/client/src/com/vaadin/client/ui/VAccordion.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VAudio.java b/client/src/com/vaadin/client/ui/VAudio.java index 647391840e..109e4d65b0 100644 --- a/client/src/com/vaadin/client/ui/VAudio.java +++ b/client/src/com/vaadin/client/ui/VAudio.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VBrowserFrame.java b/client/src/com/vaadin/client/ui/VBrowserFrame.java index 4e13921582..2c4011e87d 100644 --- a/client/src/com/vaadin/client/ui/VBrowserFrame.java +++ b/client/src/com/vaadin/client/ui/VBrowserFrame.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VButton.java b/client/src/com/vaadin/client/ui/VButton.java index 98df258f57..7dfb5c7c86 100644 --- a/client/src/com/vaadin/client/ui/VButton.java +++ b/client/src/com/vaadin/client/ui/VButton.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VCalendar.java b/client/src/com/vaadin/client/ui/VCalendar.java index 965d2a148e..f0f1bc89ca 100644 --- a/client/src/com/vaadin/client/ui/VCalendar.java +++ b/client/src/com/vaadin/client/ui/VCalendar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VCalendarPanel.java b/client/src/com/vaadin/client/ui/VCalendarPanel.java index 74462e501d..d8c96917d8 100644 --- a/client/src/com/vaadin/client/ui/VCalendarPanel.java +++ b/client/src/com/vaadin/client/ui/VCalendarPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,7 @@ import java.util.Iterator; import com.google.gwt.aria.client.Roles; import com.google.gwt.aria.client.SelectedValue; import com.google.gwt.dom.client.Element; +import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.dom.client.Node; import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.event.dom.client.BlurHandler; @@ -138,6 +139,10 @@ public class VCalendarPanel extends FocusableFlexTable implements */ @Override public void onClick(ClickEvent event) { + if (!isEnabled() || isReadonly()) { + return; + } + Date newDate = ((Day) event.getSource()).getDate(); if (!isDateInsideRange(newDate, Resolution.DAY)) { return; @@ -174,10 +179,6 @@ public class VCalendarPanel extends FocusableFlexTable implements private Date value; - private boolean enabled = true; - - private boolean readonly = false; - private DateTimeService dateTimeService; private boolean showISOWeekNumbers; @@ -349,11 +350,11 @@ public class VCalendarPanel extends FocusableFlexTable implements } private boolean isReadonly() { - return readonly; + return parent.isReadonly(); } private boolean isEnabled() { - return enabled; + return parent.isEnabled(); } @Override @@ -1498,11 +1499,12 @@ public class VCalendarPanel extends FocusableFlexTable implements */ @Override public void onMouseDown(MouseDownEvent event) { - // Allow user to click-n-hold for fast-forward or fast-rewind. + // Click-n-hold the left mouse button for fast-forward or fast-rewind. // Timer is first used for a 500ms delay after mousedown. After that has // elapsed, another timer is triggered to go off every 150ms. Both // timers are cancelled on mouseup or mouseout. - if (event.getSource() instanceof VEventButton) { + if (event.getNativeButton() == NativeEvent.BUTTON_LEFT + && event.getSource() instanceof VEventButton) { final VEventButton sender = (VEventButton) event.getSource(); processClickEvent(sender); mouseTimer = new Timer() { diff --git a/client/src/com/vaadin/client/ui/VCheckBox.java b/client/src/com/vaadin/client/ui/VCheckBox.java index 59058caf81..887dba262a 100644 --- a/client/src/com/vaadin/client/ui/VCheckBox.java +++ b/client/src/com/vaadin/client/ui/VCheckBox.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VColorPicker.java b/client/src/com/vaadin/client/ui/VColorPicker.java index f4124d7351..da98bb46a6 100644 --- a/client/src/com/vaadin/client/ui/VColorPicker.java +++ b/client/src/com/vaadin/client/ui/VColorPicker.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VColorPickerArea.java b/client/src/com/vaadin/client/ui/VColorPickerArea.java index 81f2c8fcc7..f5ff2c28b2 100644 --- a/client/src/com/vaadin/client/ui/VColorPickerArea.java +++ b/client/src/com/vaadin/client/ui/VColorPickerArea.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VContextMenu.java b/client/src/com/vaadin/client/ui/VContextMenu.java index 7aa4035f10..038ee27dad 100644 --- a/client/src/com/vaadin/client/ui/VContextMenu.java +++ b/client/src/com/vaadin/client/ui/VContextMenu.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VCssLayout.java b/client/src/com/vaadin/client/ui/VCssLayout.java index e4fac6acb3..d7d9eefef9 100644 --- a/client/src/com/vaadin/client/ui/VCssLayout.java +++ b/client/src/com/vaadin/client/ui/VCssLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VCustomComponent.java b/client/src/com/vaadin/client/ui/VCustomComponent.java index 3bd6f06541..6aa21b08d2 100644 --- a/client/src/com/vaadin/client/ui/VCustomComponent.java +++ b/client/src/com/vaadin/client/ui/VCustomComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VCustomLayout.java b/client/src/com/vaadin/client/ui/VCustomLayout.java index 7f5e4d4028..f9caceb668 100644 --- a/client/src/com/vaadin/client/ui/VCustomLayout.java +++ b/client/src/com/vaadin/client/ui/VCustomLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VDateField.java b/client/src/com/vaadin/client/ui/VDateField.java index cd9052dc73..b4084847dd 100644 --- a/client/src/com/vaadin/client/ui/VDateField.java +++ b/client/src/com/vaadin/client/ui/VDateField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VDateFieldCalendar.java b/client/src/com/vaadin/client/ui/VDateFieldCalendar.java index ee67e32c7d..759ebef102 100644 --- a/client/src/com/vaadin/client/ui/VDateFieldCalendar.java +++ b/client/src/com/vaadin/client/ui/VDateFieldCalendar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VDragAndDropWrapper.java b/client/src/com/vaadin/client/ui/VDragAndDropWrapper.java index 237d2b55c2..4010ffd542 100644 --- a/client/src/com/vaadin/client/ui/VDragAndDropWrapper.java +++ b/client/src/com/vaadin/client/ui/VDragAndDropWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VDragAndDropWrapperIE.java b/client/src/com/vaadin/client/ui/VDragAndDropWrapperIE.java index d434a4adb1..b32b36d13b 100644 --- a/client/src/com/vaadin/client/ui/VDragAndDropWrapperIE.java +++ b/client/src/com/vaadin/client/ui/VDragAndDropWrapperIE.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VEmbedded.java b/client/src/com/vaadin/client/ui/VEmbedded.java index d38d74f394..acf814471a 100644 --- a/client/src/com/vaadin/client/ui/VEmbedded.java +++ b/client/src/com/vaadin/client/ui/VEmbedded.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VFilterSelect.java b/client/src/com/vaadin/client/ui/VFilterSelect.java index e0ced98394..d21d5d2090 100644 --- a/client/src/com/vaadin/client/ui/VFilterSelect.java +++ b/client/src/com/vaadin/client/ui/VFilterSelect.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -453,7 +453,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, public void scrollUp() { debug("VFS.SP.LPS: scrollUp()"); - if (currentPage + pagesToScroll > 0) { + if (pageLength > 0 && currentPage + pagesToScroll > 0) { pagesToScroll--; cancel(); schedule(200); @@ -462,8 +462,9 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, public void scrollDown() { debug("VFS.SP.LPS: scrollDown()"); - if (totalMatches > (currentPage + pagesToScroll + 1) - * pageLength) { + if (pageLength > 0 + && totalMatches > (currentPage + pagesToScroll + 1) + * pageLength) { pagesToScroll++; cancel(); schedule(200); @@ -1217,7 +1218,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, * last page */ public boolean hasNextPage() { - if (totalMatches > (currentPage + 1) * pageLength) { + if (pageLength > 0 && totalMatches > (currentPage + 1) * pageLength) { return true; } else { return false; @@ -1415,6 +1416,10 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, panel.remove(selectedItemIcon); } selectedItemIcon = new IconWidget(client.getIcon(iconUri)); + // Older IE versions don't scale icon correctly if DOM + // contains height and width attributes. + selectedItemIcon.getElement().removeAttribute("height"); + selectedItemIcon.getElement().removeAttribute("width"); selectedItemIcon.addDomHandler(new LoadHandler() { @Override public void onLoad(LoadEvent event) { @@ -1919,6 +1924,20 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, * For internal use only. May be removed or replaced in the future. */ public void updateRootWidth() { + updateRootWidth(false); + } + + /** + * Calculates the width of the select if the select has undefined width. + * Should be called when the width changes or when the icon changes. + * <p> + * For internal use only. May be removed or replaced in the future. + * + * @param forceUpdate + * a flag that forces a recalculation even if one would not + * normally be done + */ + public void updateRootWidth(boolean forceUpdate) { ComponentConnector paintable = ConnectorMap.get(client).getConnector( this); if (paintable.isUndefinedWidth()) { @@ -1931,7 +1950,7 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, * wide. */ int w = Util.getRequiredWidth(this); - if ((!initDone || currentPage + 1 < 0) + if ((forceUpdate || !initDone || currentPage + 1 < 0) && suggestionPopupMinWidth > w) { /* * We want to compensate for the paddings just to preserve the diff --git a/client/src/com/vaadin/client/ui/VFlash.java b/client/src/com/vaadin/client/ui/VFlash.java index 73c99e52b4..cf15f89cb4 100644 --- a/client/src/com/vaadin/client/ui/VFlash.java +++ b/client/src/com/vaadin/client/ui/VFlash.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VForm.java b/client/src/com/vaadin/client/ui/VForm.java index 94379a5611..ca38ea070b 100644 --- a/client/src/com/vaadin/client/ui/VForm.java +++ b/client/src/com/vaadin/client/ui/VForm.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VFormLayout.java b/client/src/com/vaadin/client/ui/VFormLayout.java index 9ce6f4b992..7fd07a2093 100644 --- a/client/src/com/vaadin/client/ui/VFormLayout.java +++ b/client/src/com/vaadin/client/ui/VFormLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -53,8 +53,8 @@ public class VFormLayout extends SimplePanel { public VFormLayout() { super(); - setStyleName(StyleConstants.UI_LAYOUT); - addStyleName(CLASSNAME); + setStyleName(CLASSNAME); + addStyleName(StyleConstants.UI_LAYOUT); table = new VFormLayoutTable(); setWidget(table); } diff --git a/client/src/com/vaadin/client/ui/VGridLayout.java b/client/src/com/vaadin/client/ui/VGridLayout.java index 07dba1f9b3..1c42243621 100644 --- a/client/src/com/vaadin/client/ui/VGridLayout.java +++ b/client/src/com/vaadin/client/ui/VGridLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VHorizontalLayout.java b/client/src/com/vaadin/client/ui/VHorizontalLayout.java index e3d8369c8b..b890aefe3d 100644 --- a/client/src/com/vaadin/client/ui/VHorizontalLayout.java +++ b/client/src/com/vaadin/client/ui/VHorizontalLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VImage.java b/client/src/com/vaadin/client/ui/VImage.java index 92d4b83507..2742182179 100644 --- a/client/src/com/vaadin/client/ui/VImage.java +++ b/client/src/com/vaadin/client/ui/VImage.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VLabel.java b/client/src/com/vaadin/client/ui/VLabel.java index 35f47d540a..0f996fa6b9 100644 --- a/client/src/com/vaadin/client/ui/VLabel.java +++ b/client/src/com/vaadin/client/ui/VLabel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VLazyExecutor.java b/client/src/com/vaadin/client/ui/VLazyExecutor.java index 9b8f253f9d..dfa4f574c6 100644 --- a/client/src/com/vaadin/client/ui/VLazyExecutor.java +++ b/client/src/com/vaadin/client/ui/VLazyExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VLink.java b/client/src/com/vaadin/client/ui/VLink.java index b528e770d4..baad9bd955 100644 --- a/client/src/com/vaadin/client/ui/VLink.java +++ b/client/src/com/vaadin/client/ui/VLink.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VListSelect.java b/client/src/com/vaadin/client/ui/VListSelect.java index c0892f4370..b6f4f0c722 100644 --- a/client/src/com/vaadin/client/ui/VListSelect.java +++ b/client/src/com/vaadin/client/ui/VListSelect.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -151,4 +151,4 @@ public class VListSelect extends VOptionGroupBase { public void focus() { select.setFocus(true); } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/VMediaBase.java b/client/src/com/vaadin/client/ui/VMediaBase.java index eadc8258c6..53d7cef02d 100644 --- a/client/src/com/vaadin/client/ui/VMediaBase.java +++ b/client/src/com/vaadin/client/ui/VMediaBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VMenuBar.java b/client/src/com/vaadin/client/ui/VMenuBar.java index a2715fd786..f17ffbefed 100644 --- a/client/src/com/vaadin/client/ui/VMenuBar.java +++ b/client/src/com/vaadin/client/ui/VMenuBar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VNativeButton.java b/client/src/com/vaadin/client/ui/VNativeButton.java index d38e4c3374..93d8d958d6 100644 --- a/client/src/com/vaadin/client/ui/VNativeButton.java +++ b/client/src/com/vaadin/client/ui/VNativeButton.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VNativeSelect.java b/client/src/com/vaadin/client/ui/VNativeSelect.java index 04cc9e6624..8156732f6f 100644 --- a/client/src/com/vaadin/client/ui/VNativeSelect.java +++ b/client/src/com/vaadin/client/ui/VNativeSelect.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VNotification.java b/client/src/com/vaadin/client/ui/VNotification.java index 3aa3fa847d..7097b428d0 100644 --- a/client/src/com/vaadin/client/ui/VNotification.java +++ b/client/src/com/vaadin/client/ui/VNotification.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -38,9 +38,9 @@ import com.vaadin.client.UIDL; import com.vaadin.client.Util; import com.vaadin.client.ui.aria.AriaHelper; import com.vaadin.shared.Position; -import com.vaadin.shared.ui.ui.NotificationConfigurationBean; -import com.vaadin.shared.ui.ui.NotificationConfigurationBean.Role; +import com.vaadin.shared.ui.ui.NotificationRole; import com.vaadin.shared.ui.ui.UIConstants; +import com.vaadin.shared.ui.ui.UIState.NotificationTypeConfiguration; public class VNotification extends VOverlay { @@ -161,20 +161,20 @@ public class VNotification extends VOverlay { } public void show(Widget widget, Position position, String style) { - NotificationConfigurationBean styleSetup = getUiState(style); + NotificationTypeConfiguration styleSetup = getUiState(style); setWaiAriaRole(styleSetup); FlowPanel panel = new FlowPanel(); - if (styleSetup.hasAssistivePrefix()) { - panel.add(new Label(styleSetup.getAssistivePrefix())); + if (hasPrefix(styleSetup)) { + panel.add(new Label(styleSetup.prefix)); AriaHelper.setVisibleForAssistiveDevicesOnly(panel.getElement(), true); } panel.add(widget); - if (styleSetup.hasAssistivePostfix()) { - panel.add(new Label(styleSetup.getAssistivePostfix())); + if (hasPostfix(styleSetup)) { + panel.add(new Label(styleSetup.postfix)); AriaHelper.setVisibleForAssistiveDevicesOnly(panel.getElement(), true); } @@ -182,8 +182,18 @@ public class VNotification extends VOverlay { show(position, style); } + private boolean hasPostfix(NotificationTypeConfiguration styleSetup) { + return styleSetup != null && styleSetup.postfix != null + && !styleSetup.postfix.isEmpty(); + } + + private boolean hasPrefix(NotificationTypeConfiguration styleSetup) { + return styleSetup != null && styleSetup.prefix != null + && !styleSetup.prefix.isEmpty(); + } + public void show(String html, Position position, String style) { - NotificationConfigurationBean styleSetup = getUiState(style); + NotificationTypeConfiguration styleSetup = getUiState(style); String assistiveDeviceOnlyStyle = AriaHelper.ASSISTIVE_DEVICE_ONLY_STYLE; setWaiAriaRole(styleSetup); @@ -191,32 +201,35 @@ public class VNotification extends VOverlay { String type = ""; String usage = ""; - if (styleSetup != null && styleSetup.hasAssistivePrefix()) { + if (hasPrefix(styleSetup)) { type = "<span class='" + assistiveDeviceOnlyStyle + "'>" - + styleSetup.getAssistivePrefix() + "</span>"; + + styleSetup.prefix + "</span>"; } - if (styleSetup != null && styleSetup.hasAssistivePostfix()) { + if (hasPostfix(styleSetup)) { usage = "<span class='" + assistiveDeviceOnlyStyle + "'>" - + styleSetup.getAssistivePostfix() + "</span>"; + + styleSetup.postfix + "</span>"; } setWidget(new HTML(type + html + usage)); show(position, style); } - private NotificationConfigurationBean getUiState(String style) { - NotificationConfigurationBean styleSetup = getApplicationConnection() - .getUIConnector().getState().notificationConfiguration.setup + private NotificationTypeConfiguration getUiState(String style) { + if (getApplicationConnection() == null + || getApplicationConnection().getUIConnector() == null) { + return null; + } + + return getApplicationConnection().getUIConnector().getState().notificationConfigurations .get(style); - return styleSetup; } - private void setWaiAriaRole(NotificationConfigurationBean styleSetup) { + private void setWaiAriaRole(NotificationTypeConfiguration styleSetup) { Roles.getAlertRole().set(getElement()); - if (styleSetup != null && styleSetup.getAssistiveRole() != null) { - if (Role.STATUS == styleSetup.getAssistiveRole()) { + if (styleSetup != null && styleSetup.notificationRole != null) { + if (NotificationRole.STATUS == styleSetup.notificationRole) { Roles.getStatusRole().set(getElement()); } } diff --git a/client/src/com/vaadin/client/ui/VOptionGroup.java b/client/src/com/vaadin/client/ui/VOptionGroup.java index 3e4b357be3..52da725a00 100644 --- a/client/src/com/vaadin/client/ui/VOptionGroup.java +++ b/client/src/com/vaadin/client/ui/VOptionGroup.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VOptionGroupBase.java b/client/src/com/vaadin/client/ui/VOptionGroupBase.java index cc691130ad..ce75043d89 100644 --- a/client/src/com/vaadin/client/ui/VOptionGroupBase.java +++ b/client/src/com/vaadin/client/ui/VOptionGroupBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VOverlay.java b/client/src/com/vaadin/client/ui/VOverlay.java index f053b9bb8f..0ab5bf1db2 100644 --- a/client/src/com/vaadin/client/ui/VOverlay.java +++ b/client/src/com/vaadin/client/ui/VOverlay.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VPanel.java b/client/src/com/vaadin/client/ui/VPanel.java index 3b263d6dbb..946ff83180 100644 --- a/client/src/com/vaadin/client/ui/VPanel.java +++ b/client/src/com/vaadin/client/ui/VPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VPasswordField.java b/client/src/com/vaadin/client/ui/VPasswordField.java index ccc57ea532..dcbb60364c 100644 --- a/client/src/com/vaadin/client/ui/VPasswordField.java +++ b/client/src/com/vaadin/client/ui/VPasswordField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VPopupCalendar.java b/client/src/com/vaadin/client/ui/VPopupCalendar.java index e180239fc1..7dea959bb4 100644 --- a/client/src/com/vaadin/client/ui/VPopupCalendar.java +++ b/client/src/com/vaadin/client/ui/VPopupCalendar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -459,6 +459,7 @@ public class VPopupCalendar extends VTextualDate implements Field, public void setEnabled(boolean enabled) { super.setEnabled(enabled); + calendarToggle.setEnabled(enabled); Roles.getButtonRole().setAriaDisabledState(calendarToggle.getElement(), !enabled); } diff --git a/client/src/com/vaadin/client/ui/VPopupImpl.java b/client/src/com/vaadin/client/ui/VPopupImpl.java index 893b51d9b3..5da54b248c 100644 --- a/client/src/com/vaadin/client/ui/VPopupImpl.java +++ b/client/src/com/vaadin/client/ui/VPopupImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VPopupImplMozilla.java b/client/src/com/vaadin/client/ui/VPopupImplMozilla.java index 9b4cfe33cd..c9ede541ab 100644 --- a/client/src/com/vaadin/client/ui/VPopupImplMozilla.java +++ b/client/src/com/vaadin/client/ui/VPopupImplMozilla.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VPopupView.java b/client/src/com/vaadin/client/ui/VPopupView.java index 00e39532db..adf070f453 100644 --- a/client/src/com/vaadin/client/ui/VPopupView.java +++ b/client/src/com/vaadin/client/ui/VPopupView.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -43,6 +43,7 @@ import com.vaadin.client.ComponentConnector; import com.vaadin.client.Util; import com.vaadin.client.VCaptionWrapper; import com.vaadin.client.VConsole; +import com.vaadin.client.communication.StateChangeEvent; import com.vaadin.client.ui.ShortcutActionHandler.ShortcutActionHandlerOwner; import com.vaadin.client.ui.popupview.VisibilityChangeEvent; import com.vaadin.client.ui.popupview.VisibilityChangeHandler; @@ -102,7 +103,8 @@ public class VPopupView extends HTML implements Iterable<Widget> { } }); - popup.setAnimationEnabled(true); + // TODO: Enable animations once GWT fix has been merged + popup.setAnimationEnabled(false); popup.setAutoHideOnHistoryEventsEnabled(false); } @@ -192,7 +194,8 @@ public class VPopupView extends HTML implements Iterable<Widget> { * (other than it being a VOverlay) is to be considered private and * potentially subject to change. */ - public class CustomPopup extends VOverlay { + public class CustomPopup extends VOverlay implements + StateChangeEvent.StateChangeHandler { private ComponentConnector popupComponentConnector = null; @@ -332,7 +335,9 @@ public class VPopupView extends HTML implements Iterable<Widget> { @Override public boolean remove(Widget w) { - + if (popupComponentConnector != null) { + popupComponentConnector.removeStateChangeHandler(this); + } popupComponentConnector = null; popupComponentWidget = null; captionWrapper = null; @@ -343,10 +348,15 @@ public class VPopupView extends HTML implements Iterable<Widget> { public void setPopupConnector(ComponentConnector newPopupComponent) { if (newPopupComponent != popupComponentConnector) { + if (popupComponentConnector != null) { + popupComponentConnector.removeStateChangeHandler(this); + } Widget newWidget = newPopupComponent.getWidget(); setWidget(newWidget); popupComponentWidget = newWidget; popupComponentConnector = newPopupComponent; + popupComponentConnector.addStateChangeHandler("height", this); + popupComponentConnector.addStateChangeHandler("width", this); } } @@ -360,6 +370,11 @@ public class VPopupView extends HTML implements Iterable<Widget> { return super.getContainerElement(); } + @Override + public void onStateChanged(StateChangeEvent stateChangeEvent) { + positionOrSizeUpdated(); + } + }// class CustomPopup public HandlerRegistration addVisibilityChangeHandler( diff --git a/client/src/com/vaadin/client/ui/VProgressBar.java b/client/src/com/vaadin/client/ui/VProgressBar.java index 3efbbbd8a6..8d23d0c36d 100644 --- a/client/src/com/vaadin/client/ui/VProgressBar.java +++ b/client/src/com/vaadin/client/ui/VProgressBar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VProgressIndicator.java b/client/src/com/vaadin/client/ui/VProgressIndicator.java index c75113b5f4..f93fa37af6 100644 --- a/client/src/com/vaadin/client/ui/VProgressIndicator.java +++ b/client/src/com/vaadin/client/ui/VProgressIndicator.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VRichTextArea.java b/client/src/com/vaadin/client/ui/VRichTextArea.java index cb3cba3f1d..1fb88060fe 100644 --- a/client/src/com/vaadin/client/ui/VRichTextArea.java +++ b/client/src/com/vaadin/client/ui/VRichTextArea.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VScrollTable.java b/client/src/com/vaadin/client/ui/VScrollTable.java index b2ba590d8e..6717a1a521 100644 --- a/client/src/com/vaadin/client/ui/VScrollTable.java +++ b/client/src/com/vaadin/client/ui/VScrollTable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -1081,19 +1081,18 @@ public class VScrollTable extends FlowPanel implements HasWidgets, selected = true; keyboardSelectionOverRowFetchInProgress = true; } + if (selected) { + if (focusedRow == null + || !selectedRowKeys.contains(focusedRow + .getKey())) { + // The focus is no longer on a selected row, + // move focus to first selected row + setRowFocus(row); + } + } if (selected != row.isSelected()) { row.toggleSelection(); - if (selected) { - if (focusedRow == null - || !selectedRowKeys.contains(focusedRow - .getKey())) { - // The focus is no longer on a selected row, - // move focus to first selected row - setRowFocus(row); - } - } - if (!isSingleSelectMode() && !selected) { // Update selection range in case a row is // unselected from the middle of a range - #8076 @@ -1101,6 +1100,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, } } } + } } unSyncedselectionsBeforeRowFetch = null; @@ -1132,6 +1132,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets, // cell to accomodate for the size of the sort arrow. HeaderCell sortedHeader = tHead.getHeaderCell(sortColumn); if (sortedHeader != null) { + // Mark header as sorted now. Any earlier marking would lead to + // columns with wrong sizes + sortedHeader.setSorted(true); tHead.resizeCaptionContainer(sortedHeader); } // Also recalculate the width of the captionContainer element in the @@ -2699,7 +2702,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets, public void setUndefinedWidth() { definedWidth = false; - setWidth(-1, false); + if (!isResizing) { + setWidth(-1, false); + } } /** @@ -3344,11 +3349,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, if (col.hasAttribute("sortable")) { c.setSortable(true); - if (cid.equals(sortColumn)) { - c.setSorted(true); - } else { - c.setSorted(false); - } + c.setSorted(false); } else { c.setSortable(false); } @@ -3359,7 +3360,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, c.setAlign(ALIGN_LEFT); } - if (col.hasAttribute("width")) { + if (col.hasAttribute("width") && !c.isResizing) { // Make sure to accomodate for the sort indicator if // necessary. int width = col.getIntAttribute("width"); @@ -3843,7 +3844,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, "right"); break; default: - DOM.setStyleAttribute(captionContainer, "textAlign", ""); + DOM.setStyleAttribute(captionContainer, "textAlign", "left"); break; } } @@ -4271,7 +4272,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, } if (col.hasAttribute("width")) { - if (scrollBody == null) { + if (scrollBody == null || isNewBody) { // Already updated by setColWidth called from // TableHeads.updateCellsFromUIDL in case of a server // side resize @@ -5302,17 +5303,12 @@ public class VScrollTable extends FlowPanel implements HasWidgets, */ public boolean isInViewPort() { int absoluteTop = getAbsoluteTop(); - int scrollPosition = scrollBodyPanel.getAbsoluteTop() - + scrollBodyPanel.getScrollPosition(); - if (absoluteTop < scrollPosition) { - return false; - } - int maxVisible = scrollPosition - + scrollBodyPanel.getOffsetHeight() - getOffsetHeight(); - if (absoluteTop > maxVisible) { - return false; - } - return true; + int absoluteBottom = absoluteTop + getOffsetHeight(); + int viewPortTop = scrollBodyPanel.getAbsoluteTop(); + int viewPortBottom = viewPortTop + + scrollBodyPanel.getOffsetHeight(); + return absoluteBottom > viewPortTop + && absoluteTop < viewPortBottom; } /** @@ -5407,17 +5403,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, } else { container.setInnerText(text); } - if (align != ALIGN_LEFT) { - switch (align) { - case ALIGN_CENTER: - container.getStyle().setProperty("textAlign", "center"); - break; - case ALIGN_RIGHT: - default: - container.getStyle().setProperty("textAlign", "right"); - break; - } - } + setAlign(align, container); setTooltip(td, description); td.appendChild(container); @@ -5455,6 +5441,21 @@ public class VScrollTable extends FlowPanel implements HasWidgets, } + private void setAlign(char align, final Element container) { + switch (align) { + case ALIGN_CENTER: + container.getStyle().setProperty("textAlign", "center"); + break; + case ALIGN_LEFT: + container.getStyle().setProperty("textAlign", "left"); + break; + case ALIGN_RIGHT: + default: + container.getStyle().setProperty("textAlign", "right"); + break; + } + } + protected void initCellWithWidget(Widget w, char align, String style, boolean sorted, final TableCellElement td) { final Element container = DOM.createDiv(); @@ -5471,21 +5472,7 @@ public class VScrollTable extends FlowPanel implements HasWidgets, td.setClassName(className); container.setClassName(VScrollTable.this.getStylePrimaryName() + "-cell-wrapper"); - // TODO most components work with this, but not all (e.g. - // Select) - // Old comment: make widget cells respect align. - // text-align:center for IE, margin: auto for others - if (align != ALIGN_LEFT) { - switch (align) { - case ALIGN_CENTER: - container.getStyle().setProperty("textAlign", "center"); - break; - case ALIGN_RIGHT: - default: - container.getStyle().setProperty("textAlign", "right"); - break; - } - } + setAlign(align, container); td.appendChild(container); getElement().appendChild(td); // ensure widget not attached to another element (possible tBody @@ -6652,6 +6639,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets, int checksum = 0; while (headCells.hasNext()) { hCell = (HeaderCell) headCells.next(); + if (hCell.isResizing) { + continue; + } if (!hCell.isDefinedWidth()) { int w = hCell.getNaturalColumnWidth(colIndex); int newSpace; @@ -6721,8 +6711,9 @@ public class VScrollTable extends FlowPanel implements HasWidgets, } int heightBefore = getOffsetHeight(); scrollBodyPanel.setHeight(bodyHeight + "px"); + if (heightBefore != getOffsetHeight()) { - Util.notifyParentOfSizeChange(VScrollTable.this, false); + Util.notifyParentOfSizeChange(VScrollTable.this, rendering); } } Scheduler.get().scheduleDeferred(new Command() { @@ -7101,7 +7092,11 @@ public class VScrollTable extends FlowPanel implements HasWidgets, dropDetails = new TableDDDetails(); Element elementOver = drag.getElementOver(); - VScrollTableRow row = Util.findWidget(elementOver, getRowClass()); + Class<? extends Widget> clazz = getRowClass(); + VScrollTableRow row = null; + if (clazz != null) { + row = Util.findWidget(elementOver, clazz); + } if (row != null) { dropDetails.overkey = row.rowKey; Element tr = row.getElement(); @@ -7127,7 +7122,12 @@ public class VScrollTable extends FlowPanel implements HasWidgets, private Class<? extends Widget> getRowClass() { // get the row type this way to make dd work in derived // implementations - return scrollBody.iterator().next().getClass(); + Iterator<Widget> iterator = scrollBody.iterator(); + if (iterator.hasNext()) { + return iterator.next().getClass(); + } else { + return null; + } } @Override diff --git a/client/src/com/vaadin/client/ui/VSlider.java b/client/src/com/vaadin/client/ui/VSlider.java index 7ac31fd85a..bc314e0314 100644 --- a/client/src/com/vaadin/client/ui/VSlider.java +++ b/client/src/com/vaadin/client/ui/VSlider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VSplitPanelHorizontal.java b/client/src/com/vaadin/client/ui/VSplitPanelHorizontal.java index b78fd3ce94..c6919d456b 100644 --- a/client/src/com/vaadin/client/ui/VSplitPanelHorizontal.java +++ b/client/src/com/vaadin/client/ui/VSplitPanelHorizontal.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VSplitPanelVertical.java b/client/src/com/vaadin/client/ui/VSplitPanelVertical.java index 3d9ef65eca..b008e5d3f0 100644 --- a/client/src/com/vaadin/client/ui/VSplitPanelVertical.java +++ b/client/src/com/vaadin/client/ui/VSplitPanelVertical.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VTabsheet.java b/client/src/com/vaadin/client/ui/VTabsheet.java index f2e4003e7f..d2d61207ea 100644 --- a/client/src/com/vaadin/client/ui/VTabsheet.java +++ b/client/src/com/vaadin/client/ui/VTabsheet.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -92,7 +92,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Representation of a single "tab" shown in the TabBar - * + * */ public static class Tab extends SimplePanel implements HasFocusHandlers, HasBlurHandlers, HasKeyDownHandlers { @@ -194,7 +194,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Toggles the style names for the Tab - * + * * @param selected * true if the Tab is selected * @param first @@ -324,8 +324,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, } private boolean update(TabState tabState) { - if (tabState.description != null - || tabState.componentError != null) { + if (tabState.description != null || tabState.componentError != null) { setTooltipInfo(new TooltipInfo(tabState.description, tabState.componentError)); } else { @@ -337,14 +336,11 @@ public class VTabsheet extends VTabsheetBase implements Focusable, String captionString = tabState.caption.isEmpty() ? null : tabState.caption; boolean ret = updateCaptionWithoutOwner(captionString, - !tabState.enabled, - hasAttribute(tabState.description), + !tabState.enabled, hasAttribute(tabState.description), hasAttribute(tabState.componentError), tab.getTabsheet().connector .getResourceUrl(ComponentConstants.ICON_RESOURCE - + tabState.key), - tabState.iconAltText - ); + + tabState.key), tabState.iconAltText); setClosable(tabState.closable); @@ -581,7 +577,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Returns the index of the first visible tab - * + * * @return */ private int getFirstVisibleTab() { @@ -590,7 +586,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Find the next visible tab. Returns -1 if none is found. - * + * * @param i * @return */ @@ -609,7 +605,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Find the previous visible tab. Returns -1 if none is found. - * + * * @param i * @return */ @@ -721,7 +717,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Load the content of a tab of the provided index. - * + * * @param index * of the tab to load */ @@ -747,7 +743,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Returns the currently displayed widget in the tab panel. - * + * * @since 7.2 * @return currently displayed content widget */ @@ -757,7 +753,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Returns the client to server RPC proxy for the tabsheet. - * + * * @since 7.2 * @return RPC proxy */ @@ -767,10 +763,10 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * For internal use only. - * + * * Avoid using this method directly and use appropriate superclass methods * where applicable. - * + * * @deprecated since 7.2 - use more specific methods instead (getRpcProxy(), * getConnectorForWidget(Widget) etc.) * @return ApplicationConnection @@ -885,7 +881,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Checks if the tab with the selected index has been scrolled out of the * view (on the left side). - * + * * @param index * @return */ @@ -916,7 +912,6 @@ public class VTabsheet extends VTabsheetBase implements Focusable, DOM.setElementProperty(tabs, "className", tabsClass); DOM.setElementProperty(contentNode, "className", contentClass); DOM.setElementProperty(deco, "className", decoClass); - borderW = -1; } } else { tb.setStyleName(CLASSNAME + "-tabs"); @@ -993,10 +988,10 @@ public class VTabsheet extends VTabsheetBase implements Focusable, if (scrolledOutOfView(index)) { // Should not set tabs visible if they are scrolled out of view - tabState.visible = false; + tab.setVisible(false); + } else { + tab.setVisible(tabState.visible); } - // Set the current visibility of the tab (in the browser) - tab.setVisible(tabState.visible); /* * Force the width of the caption container so the content will not wrap @@ -1018,7 +1013,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Renders the widget content for a tab sheet. - * + * * @param newWidget */ public void renderContent(Widget newWidget) { @@ -1045,6 +1040,16 @@ public class VTabsheet extends VTabsheetBase implements Focusable, VTabsheet.this.removeStyleDependentName("loading"); } + /** + * Recalculates the sizes of tab captions, causing the tabs to be rendered + * the correct size. + */ + private void updateTabCaptionSizes() { + for (int tabIx = 0; tabIx < tb.getTabCount(); tabIx++) { + tb.getTab(tabIx).recalculateCaptionWidth(); + } + } + /** For internal use only. May be removed or replaced in the future. */ public void updateContentNodeHeight() { if (!isDynamicHeight()) { @@ -1062,8 +1067,12 @@ public class VTabsheet extends VTabsheetBase implements Focusable, } } + /** + * Run internal layouting. + */ public void iLayout() { updateTabScroller(); + updateTabCaptionSizes(); } /** @@ -1195,14 +1204,9 @@ public class VTabsheet extends VTabsheetBase implements Focusable, return tabPanel.iterator(); } - private int borderW = -1; - /** For internal use only. May be removed or replaced in the future. */ public int getContentAreaBorderWidth() { - if (borderW < 0) { - borderW = Util.measureHorizontalBorder(contentNode); - } - return borderW; + return Util.measureHorizontalBorder(contentNode); } @Override @@ -1379,7 +1383,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Makes tab bar visible. - * + * * @since 7.2 */ public void showTabs() { @@ -1390,7 +1394,7 @@ public class VTabsheet extends VTabsheetBase implements Focusable, /** * Makes tab bar invisible. - * + * * @since 7.2 */ public void hideTabs() { diff --git a/client/src/com/vaadin/client/ui/VTabsheetBase.java b/client/src/com/vaadin/client/ui/VTabsheetBase.java index 6d9f78e87f..59f0bc565c 100644 --- a/client/src/com/vaadin/client/ui/VTabsheetBase.java +++ b/client/src/com/vaadin/client/ui/VTabsheetBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VTabsheetPanel.java b/client/src/com/vaadin/client/ui/VTabsheetPanel.java index 6bd63cdbd3..b2d751332e 100644 --- a/client/src/com/vaadin/client/ui/VTabsheetPanel.java +++ b/client/src/com/vaadin/client/ui/VTabsheetPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VTextArea.java b/client/src/com/vaadin/client/ui/VTextArea.java index 2a697969df..edcb207bf9 100644 --- a/client/src/com/vaadin/client/ui/VTextArea.java +++ b/client/src/com/vaadin/client/ui/VTextArea.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -17,12 +17,15 @@ package com.vaadin.client.ui; import com.google.gwt.core.client.Scheduler; +import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style.Overflow; import com.google.gwt.dom.client.Style.WhiteSpace; import com.google.gwt.dom.client.TextAreaElement; import com.google.gwt.event.dom.client.ChangeEvent; import com.google.gwt.event.dom.client.ChangeHandler; +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.event.dom.client.KeyUpEvent; import com.google.gwt.event.dom.client.KeyUpHandler; import com.google.gwt.user.client.Command; @@ -30,6 +33,7 @@ import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Event; import com.vaadin.client.BrowserInfo; import com.vaadin.client.Util; +import com.vaadin.client.ui.dd.DragImageModifier; /** * This class represents a multiline textfield (textarea). @@ -40,15 +44,22 @@ import com.vaadin.client.Util; * @author Vaadin Ltd. * */ -public class VTextArea extends VTextField { +public class VTextArea extends VTextField implements DragImageModifier { + public static final String CLASSNAME = "v-textarea"; private boolean wordwrap = true; private MaxLengthHandler maxLengthHandler = new MaxLengthHandler(); private boolean browserSupportsMaxLengthAttribute = browserSupportsMaxLengthAttribute(); + private EnterDownHandler enterDownHandler = new EnterDownHandler(); public VTextArea() { super(DOM.createTextArea()); setStyleName(CLASSNAME); + + // KeyDownHandler is needed for correct text input on all + // browsers, not just those that don't support a max length attribute + addKeyDownHandler(enterDownHandler); + if (!browserSupportsMaxLengthAttribute) { addKeyUpHandler(maxLengthHandler); addChangeHandler(maxLengthHandler); @@ -247,6 +258,20 @@ public class VTextArea extends VTextField { } } + private class EnterDownHandler implements KeyDownHandler { + + @Override + public void onKeyDown(KeyDownEvent event) { + // Fix for #12424 - if the key being pressed is enter, we stop + // propagation of the KeyDownEvents. This prevents shortcuts that + // are bound to the enter key from being processed. + if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) { + event.stopPropagation(); + } + } + + } + @Override public int getCursorPos() { // This is needed so that TextBoxImplIE6 is used to return the correct @@ -292,6 +317,17 @@ public class VTextArea extends VTextField { // Overridden to avoid submitting TextArea value on enter in IE. This is // another reason why widgets should inherit a common abstract // class instead of directly each other. + // This method is overridden only for IE and Firefox. } + @Override + public void modifyDragImage(Element element) { + // Fix for #13557 - drag image doesn't show original text area text. + // It happens because "value" property is not copied into the cloned + // element + String value = getElement().getPropertyString("value"); + if (value != null) { + element.setPropertyString("value", value); + } + } } diff --git a/client/src/com/vaadin/client/ui/VTextField.java b/client/src/com/vaadin/client/ui/VTextField.java index 98c8699405..c517f8fec0 100644 --- a/client/src/com/vaadin/client/ui/VTextField.java +++ b/client/src/com/vaadin/client/ui/VTextField.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VTextualDate.java b/client/src/com/vaadin/client/ui/VTextualDate.java index 44a3321f6f..b95f696030 100644 --- a/client/src/com/vaadin/client/ui/VTextualDate.java +++ b/client/src/com/vaadin/client/ui/VTextualDate.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -216,6 +216,12 @@ public class VTextualDate extends VDateField implements Field, ChangeHandler, } + @Override + public void setEnabled(boolean enabled) { + super.setEnabled(enabled); + text.setEnabled(enabled); + } + protected void setPrompting(boolean prompting) { this.prompting = prompting; if (prompting) { diff --git a/client/src/com/vaadin/client/ui/VTree.java b/client/src/com/vaadin/client/ui/VTree.java index 4979de6a47..b12053ea04 100644 --- a/client/src/com/vaadin/client/ui/VTree.java +++ b/client/src/com/vaadin/client/ui/VTree.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VTreeTable.java b/client/src/com/vaadin/client/ui/VTreeTable.java index 591aa6b0de..49d398246f 100644 --- a/client/src/com/vaadin/client/ui/VTreeTable.java +++ b/client/src/com/vaadin/client/ui/VTreeTable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VTwinColSelect.java b/client/src/com/vaadin/client/ui/VTwinColSelect.java index 33f1afea31..08018e4d64 100644 --- a/client/src/com/vaadin/client/ui/VTwinColSelect.java +++ b/client/src/com/vaadin/client/ui/VTwinColSelect.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VUI.java b/client/src/com/vaadin/client/ui/VUI.java index 590263a5ed..df24c3b1c7 100644 --- a/client/src/com/vaadin/client/ui/VUI.java +++ b/client/src/com/vaadin/client/ui/VUI.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VUnknownComponent.java b/client/src/com/vaadin/client/ui/VUnknownComponent.java index ea97110aaa..89907854de 100644 --- a/client/src/com/vaadin/client/ui/VUnknownComponent.java +++ b/client/src/com/vaadin/client/ui/VUnknownComponent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VUpload.java b/client/src/com/vaadin/client/ui/VUpload.java index bcb4265d50..92df9d9614 100644 --- a/client/src/com/vaadin/client/ui/VUpload.java +++ b/client/src/com/vaadin/client/ui/VUpload.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VVerticalLayout.java b/client/src/com/vaadin/client/ui/VVerticalLayout.java index d82f35050d..00ef0fc719 100644 --- a/client/src/com/vaadin/client/ui/VVerticalLayout.java +++ b/client/src/com/vaadin/client/ui/VVerticalLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VVideo.java b/client/src/com/vaadin/client/ui/VVideo.java index 376c832bed..023a7f9ee0 100644 --- a/client/src/com/vaadin/client/ui/VVideo.java +++ b/client/src/com/vaadin/client/ui/VVideo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/VWindow.java b/client/src/com/vaadin/client/ui/VWindow.java index 396fc76eb0..0f759caa2e 100644 --- a/client/src/com/vaadin/client/ui/VWindow.java +++ b/client/src/com/vaadin/client/ui/VWindow.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -67,7 +67,7 @@ import com.vaadin.client.ui.window.WindowMoveHandler; import com.vaadin.shared.Connector; import com.vaadin.shared.EventId; import com.vaadin.shared.ui.window.WindowMode; -import com.vaadin.shared.ui.window.WindowState.WindowRole; +import com.vaadin.shared.ui.window.WindowRole; /** * "Sub window" component. diff --git a/client/src/com/vaadin/client/ui/VWindowOverlay.java b/client/src/com/vaadin/client/ui/VWindowOverlay.java index 6558ab14fa..41a8276402 100644 --- a/client/src/com/vaadin/client/ui/VWindowOverlay.java +++ b/client/src/com/vaadin/client/ui/VWindowOverlay.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java b/client/src/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java index 6a6a1429f8..366775e9a2 100644 --- a/client/src/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/absolutelayout/AbsoluteLayoutConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/accordion/AccordionConnector.java b/client/src/com/vaadin/client/ui/accordion/AccordionConnector.java index ce843dc22f..c0caded759 100644 --- a/client/src/com/vaadin/client/ui/accordion/AccordionConnector.java +++ b/client/src/com/vaadin/client/ui/accordion/AccordionConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -59,6 +59,7 @@ public class AccordionConnector extends TabsheetBaseConnector implements } else if (getWidget().getOpenStackItem() != null) { getWidget().close(getWidget().getOpenStackItem()); } + getLayoutManager().setNeedsVerticalLayout(this); } @Override diff --git a/client/src/com/vaadin/client/ui/aria/AriaHelper.java b/client/src/com/vaadin/client/ui/aria/AriaHelper.java index b1f51b85e9..bf93901a33 100644 --- a/client/src/com/vaadin/client/ui/aria/AriaHelper.java +++ b/client/src/com/vaadin/client/ui/aria/AriaHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/aria/HandlesAriaCaption.java b/client/src/com/vaadin/client/ui/aria/HandlesAriaCaption.java index e754f2d095..369edb7d69 100644 --- a/client/src/com/vaadin/client/ui/aria/HandlesAriaCaption.java +++ b/client/src/com/vaadin/client/ui/aria/HandlesAriaCaption.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/aria/HandlesAriaInvalid.java b/client/src/com/vaadin/client/ui/aria/HandlesAriaInvalid.java index 05cb82b0d6..296e455dcd 100644 --- a/client/src/com/vaadin/client/ui/aria/HandlesAriaInvalid.java +++ b/client/src/com/vaadin/client/ui/aria/HandlesAriaInvalid.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/aria/HandlesAriaRequired.java b/client/src/com/vaadin/client/ui/aria/HandlesAriaRequired.java index 9b18bfb4de..95ebd7fb9a 100644 --- a/client/src/com/vaadin/client/ui/aria/HandlesAriaRequired.java +++ b/client/src/com/vaadin/client/ui/aria/HandlesAriaRequired.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/audio/AudioConnector.java b/client/src/com/vaadin/client/ui/audio/AudioConnector.java index 5a90cab09d..f238ecc08c 100644 --- a/client/src/com/vaadin/client/ui/audio/AudioConnector.java +++ b/client/src/com/vaadin/client/ui/audio/AudioConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/browserframe/BrowserFrameConnector.java b/client/src/com/vaadin/client/ui/browserframe/BrowserFrameConnector.java index 736bdc25a7..8ff8a0b72d 100644 --- a/client/src/com/vaadin/client/ui/browserframe/BrowserFrameConnector.java +++ b/client/src/com/vaadin/client/ui/browserframe/BrowserFrameConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/button/ButtonConnector.java b/client/src/com/vaadin/client/ui/button/ButtonConnector.java index 32a457c1f1..4220c3f5d1 100644 --- a/client/src/com/vaadin/client/ui/button/ButtonConnector.java +++ b/client/src/com/vaadin/client/ui/button/ButtonConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -66,8 +66,7 @@ public class ButtonConnector extends AbstractComponentConnector implements getWidget().errorIndicatorElement .setClassName("v-errorindicator"); } - getWidget().wrapper.insertBefore(getWidget().errorIndicatorElement, - getWidget().captionElement); + getWidget().wrapper.insertFirst(getWidget().errorIndicatorElement); } else if (getWidget().errorIndicatorElement != null) { getWidget().wrapper.removeChild(getWidget().errorIndicatorElement); diff --git a/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java b/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java index 89f923d483..cbf63768a3 100644 --- a/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java +++ b/client/src/com/vaadin/client/ui/calendar/CalendarConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/VCalendarAction.java b/client/src/com/vaadin/client/ui/calendar/VCalendarAction.java index 2a529354e5..470ee3cf1a 100644 --- a/client/src/com/vaadin/client/ui/calendar/VCalendarAction.java +++ b/client/src/com/vaadin/client/ui/calendar/VCalendarAction.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/CalendarDay.java b/client/src/com/vaadin/client/ui/calendar/schedule/CalendarDay.java index ca176c08c1..44b82f166f 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/CalendarDay.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/CalendarDay.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/CalendarEvent.java b/client/src/com/vaadin/client/ui/calendar/schedule/CalendarEvent.java index e2c06d41ea..d3a5e3f16e 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/CalendarEvent.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/CalendarEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -310,4 +310,4 @@ public class CalendarEvent { } return false; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DateCell.java b/client/src/com/vaadin/client/ui/calendar/schedule/DateCell.java index c3fd2b54cf..ffa5f78071 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DateCell.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DateCell.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -829,4 +829,4 @@ public class DateCell extends FocusableComplexPanel implements .contextMenu(event, DateCell.this); } } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java index 04e6bb7df6..82af89c794 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellContainer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -114,4 +114,4 @@ public class DateCellContainer extends FlowPanel implements MouseDownHandler, } } } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java index ae86833952..bbbd355a32 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellDayEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -642,4 +642,4 @@ public class DateCellDayEvent extends FocusableHTML implements public Object getTooltipKey() { return eventIndex; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java index 79276eab7b..f4ef22f4ca 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DateCellGroup.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -56,4 +56,4 @@ public class DateCellGroup { public void add(Integer index) { items.add(index); } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DateUtil.java b/client/src/com/vaadin/client/ui/calendar/schedule/DateUtil.java index 84726327e2..165bbefefc 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DateUtil.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DateUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/DayToolbar.java b/client/src/com/vaadin/client/ui/calendar/schedule/DayToolbar.java index 58b5fafa7f..db3f47dfed 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/DayToolbar.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/DayToolbar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java index 6b42caec10..cdad83744e 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableComplexPanel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java index b40f1c3652..1369392656 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableGrid.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java index 31d810608a..0c6ddb3697 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/FocusableHTML.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/HasTooltipKey.java b/client/src/com/vaadin/client/ui/calendar/schedule/HasTooltipKey.java index 5827068840..d04ec39527 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/HasTooltipKey.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/HasTooltipKey.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java b/client/src/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java index 928ff85f18..6fc2e430cd 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/MonthEventLabel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -161,4 +161,4 @@ public class MonthEventLabel extends HTML implements HasTooltipKey { public CalendarEvent getCalendarEvent() { return calendarEvent; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/MonthGrid.java b/client/src/com/vaadin/client/ui/calendar/schedule/MonthGrid.java index 3b1c774793..52a81d0eb9 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/MonthGrid.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/MonthGrid.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -212,4 +212,4 @@ public class MonthGrid extends FocusableGrid implements KeyDownHandler { return -1; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java b/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java index 00fc1ef3ea..8e83dc4e36 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayCell.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -698,4 +698,4 @@ public class SimpleDayCell extends FocusableFlowPanel implements public void removeEmphasisStyle() { removeStyleDependentName("dragemphasis"); } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayToolbar.java b/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayToolbar.java index fc75136b93..3133341542 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayToolbar.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/SimpleDayToolbar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -94,4 +94,4 @@ public class SimpleDayToolbar extends HorizontalPanel { } } } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java b/client/src/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java index 59902811cd..fc79163d3e 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/SimpleWeekToolbar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -106,4 +106,4 @@ public class SimpleWeekToolbar extends FlexTable implements ClickHandler { wl.getYear() + "w" + wl.getWeek()); } } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/WeekGrid.java b/client/src/com/vaadin/client/ui/calendar/schedule/WeekGrid.java index 450ea29549..d1d99e6cf2 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/WeekGrid.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/WeekGrid.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java b/client/src/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java index e634735be7..07bcc1e887 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/WeekGridMinuteTimeRange.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -59,4 +59,4 @@ public class WeekGridMinuteTimeRange { && a.getEnd().compareTo(b.getStart()) > 0; return overlaps; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/WeekLabel.java b/client/src/com/vaadin/client/ui/calendar/schedule/WeekLabel.java index bde8675435..bb0cf5d1ea 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/WeekLabel.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/WeekLabel.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -48,4 +48,4 @@ public class WeekLabel extends Label { public void setYear(int year) { this.year = year; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java b/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java index f7c5c0dac4..bd833e06a0 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEvents.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEventsDateCell.java b/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEventsDateCell.java index a97d352e81..7d3dc9b89a 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEventsDateCell.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/WeeklyLongEventsDateCell.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -64,4 +64,4 @@ public class WeeklyLongEventsDateCell extends HTML implements HasTooltipKey { } return null; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java index ab0c9f2e9a..92046f96ec 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarDropHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java index 7c0c541ee3..9cab421200 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarMonthDropHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java index d19dcfedc4..853e4b724e 100644 --- a/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java +++ b/client/src/com/vaadin/client/ui/calendar/schedule/dd/CalendarWeekDropHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/checkbox/CheckBoxConnector.java b/client/src/com/vaadin/client/ui/checkbox/CheckBoxConnector.java index b40e96ff95..7c5ce9f673 100644 --- a/client/src/com/vaadin/client/ui/checkbox/CheckBoxConnector.java +++ b/client/src/com/vaadin/client/ui/checkbox/CheckBoxConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java b/client/src/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java index ba0575d8fe..ac168d1f9a 100644 --- a/client/src/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java +++ b/client/src/com/vaadin/client/ui/colorpicker/AbstractColorPickerConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java index 7377b0044b..2237920cb8 100644 --- a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java +++ b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerAreaConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java index 8bf2825d68..237241fe81 100644 --- a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java +++ b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerGradientConnector.java b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerGradientConnector.java index b28831b860..223675f660 100644 --- a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerGradientConnector.java +++ b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerGradientConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -82,4 +82,4 @@ public class ColorPickerGradientConnector extends AbstractComponentConnector getWidget().addMouseUpHandler(this); } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java index 730981d2dd..dc3c3ca790 100644 --- a/client/src/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java +++ b/client/src/com/vaadin/client/ui/colorpicker/ColorPickerGridConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java b/client/src/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java index 3a135e2381..70ced91da4 100644 --- a/client/src/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java +++ b/client/src/com/vaadin/client/ui/colorpicker/VColorPickerGradient.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java b/client/src/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java index 8c9c34d668..c407bdc5ef 100644 --- a/client/src/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java +++ b/client/src/com/vaadin/client/ui/colorpicker/VColorPickerGrid.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java index 8dec26cf90..84d1475185 100644 --- a/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java +++ b/client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -22,6 +22,7 @@ import java.util.List; import com.vaadin.client.ApplicationConnection; import com.vaadin.client.Paintable; import com.vaadin.client.UIDL; +import com.vaadin.client.communication.StateChangeEvent; import com.vaadin.client.ui.AbstractFieldConnector; import com.vaadin.client.ui.SimpleManagedLayout; import com.vaadin.client.ui.VFilterSelect; @@ -41,6 +42,10 @@ public class ComboBoxConnector extends AbstractFieldConnector implements // update textbox text by a changed item caption. private boolean oldSuggestionTextMatchTheOldSelection; + // Need to recompute the width of the combobox when styles change, see + // #13444 + private boolean stylesChanged; + /* * (non-Javadoc) * @@ -121,6 +126,10 @@ public class ComboBoxConnector extends AbstractFieldConnector implements boolean suggestionsChanged = !getWidget().initDone || !newSuggestions.equals(getWidget().currentSuggestions); + // An ItemSetChangeEvent on server side clears the current suggestion + // popup. Popup needs to be repopulated with suggestions from UIDL. + boolean popupOpenAndCleared = false; + oldSuggestionTextMatchTheOldSelection = false; if (suggestionsChanged) { @@ -141,6 +150,7 @@ public class ComboBoxConnector extends AbstractFieldConnector implements * menu might not necessary exist in select at all anymore. */ getWidget().suggestionPopup.menu.clearItems(); + popupOpenAndCleared = getWidget().suggestionPopup.isAttached(); } @@ -159,9 +169,9 @@ public class ComboBoxConnector extends AbstractFieldConnector implements } } - if (getWidget().waitingForFilteringResponse - && getWidget().lastFilter.toLowerCase().equals( - uidl.getStringVariable("filter"))) { + if ((getWidget().waitingForFilteringResponse && getWidget().lastFilter + .toLowerCase().equals(uidl.getStringVariable("filter"))) + || popupOpenAndCleared) { getWidget().suggestionPopup.showSuggestions( getWidget().currentSuggestions, getWidget().currentPage, getWidget().totalMatches); @@ -202,8 +212,11 @@ public class ComboBoxConnector extends AbstractFieldConnector implements getWidget().popupOpenerClicked = false; - if (!getWidget().initDone) { - getWidget().updateRootWidth(); + // styles have changed or this is our first time - either way we + // need to recalculate the root width. + if (!getWidget().initDone || stylesChanged) { + boolean forceUpdate = true; + getWidget().updateRootWidth(forceUpdate); } // Focus dependent style names are lost during the update, so we add @@ -212,6 +225,9 @@ public class ComboBoxConnector extends AbstractFieldConnector implements getWidget().addStyleDependentName("focus"); } + // width has been recalculated above, clear style change flag + stylesChanged = false; + getWidget().initDone = true; } @@ -267,7 +283,9 @@ public class ComboBoxConnector extends AbstractFieldConnector implements // we have focus in field, prompting can't be set on, instead // just clear the input if the value has changed from something // else to null - if (getWidget().selectedOptionKey != null) { + if (getWidget().selectedOptionKey != null + || (getWidget().allowNewItem && !getWidget().tb + .getValue().isEmpty())) { getWidget().tb.setValue(""); } } @@ -300,4 +318,13 @@ public class ComboBoxConnector extends AbstractFieldConnector implements getWidget().enabled = widgetEnabled; getWidget().tb.setEnabled(widgetEnabled); } + + @Override + public void onStateChanged(StateChangeEvent event) { + super.onStateChanged(event); + if (event.hasPropertyChanged("styles")) { + stylesChanged = true; + } + } + } diff --git a/client/src/com/vaadin/client/ui/csslayout/CssLayoutConnector.java b/client/src/com/vaadin/client/ui/csslayout/CssLayoutConnector.java index 034fd79364..16c80cfa15 100644 --- a/client/src/com/vaadin/client/ui/csslayout/CssLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/csslayout/CssLayoutConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/customcomponent/CustomComponentConnector.java b/client/src/com/vaadin/client/ui/customcomponent/CustomComponentConnector.java index 90ed2feaa5..e981dc13fc 100644 --- a/client/src/com/vaadin/client/ui/customcomponent/CustomComponentConnector.java +++ b/client/src/com/vaadin/client/ui/customcomponent/CustomComponentConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/customfield/CustomFieldConnector.java b/client/src/com/vaadin/client/ui/customfield/CustomFieldConnector.java index c6e4b87b73..d18574d010 100644 --- a/client/src/com/vaadin/client/ui/customfield/CustomFieldConnector.java +++ b/client/src/com/vaadin/client/ui/customfield/CustomFieldConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java b/client/src/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java index 029db18dab..a37ce9af38 100644 --- a/client/src/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/customlayout/CustomLayoutConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java b/client/src/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java index 3baae4f117..6d1c9316f6 100644 --- a/client/src/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/AbstractDateFieldConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java b/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java index 2fb40b3cdb..6321e1c092 100644 --- a/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/InlineDateFieldConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java index d2aadca99b..a349eb2993 100644 --- a/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/PopupDateFieldConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -103,8 +103,6 @@ public class PopupDateFieldConnector extends TextualDateConnector { getWidget().calendar.renderCalendar(); } - getWidget().calendarToggle.setEnabled(getWidget().isEnabled()); - if (getWidget().getCurrentResolution().getCalendarField() <= Resolution.MONTH .getCalendarField()) { getWidget().calendar @@ -161,7 +159,6 @@ public class PopupDateFieldConnector extends TextualDateConnector { getWidget().setDescriptionForAssistiveDevices( getState().descriptionForAssistiveDevices); - getWidget().calendarToggle.setEnabled(true); } @Override diff --git a/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java b/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java index 9357f9f946..8545c20d7d 100644 --- a/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java +++ b/client/src/com/vaadin/client/ui/datefield/TextualDateConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/DDUtil.java b/client/src/com/vaadin/client/ui/dd/DDUtil.java index 96f681b54a..dfdafe1352 100644 --- a/client/src/com/vaadin/client/ui/dd/DDUtil.java +++ b/client/src/com/vaadin/client/ui/dd/DDUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/DragImageModifier.java b/client/src/com/vaadin/client/ui/dd/DragImageModifier.java new file mode 100644 index 0000000000..f08c082a70 --- /dev/null +++ b/client/src/com/vaadin/client/ui/dd/DragImageModifier.java @@ -0,0 +1,39 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.client.ui.dd; + +import com.google.gwt.dom.client.Element; + +/** + * Interface implemented by widgets if the drag image used for drag'n'drop + * requires additional initialization/configuration. The method + * {@link #modifyDragImage(Element)} is called for each element in the automatically generated drag image. + * + * @since 7.2 + * @author Vaadin Ltd + */ +public interface DragImageModifier { + + /** + * This method is called for cloned <code>element</code> which corresponds + * to the widget element. One could modify/correct this <code>element</code> + * for drag image. + * + * @param element + * cloned element of drag image + */ + void modifyDragImage(Element element); +} diff --git a/client/src/com/vaadin/client/ui/dd/VAbstractDropHandler.java b/client/src/com/vaadin/client/ui/dd/VAbstractDropHandler.java index 44a97042c3..61708260a1 100644 --- a/client/src/com/vaadin/client/ui/dd/VAbstractDropHandler.java +++ b/client/src/com/vaadin/client/ui/dd/VAbstractDropHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/VAcceptAll.java b/client/src/com/vaadin/client/ui/dd/VAcceptAll.java index 72ca7f5523..bb6170da45 100644 --- a/client/src/com/vaadin/client/ui/dd/VAcceptAll.java +++ b/client/src/com/vaadin/client/ui/dd/VAcceptAll.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -29,4 +29,4 @@ final public class VAcceptAll extends VAcceptCriterion { protected boolean accept(VDragEvent drag, UIDL configuration) { return true; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VAcceptCallback.java b/client/src/com/vaadin/client/ui/dd/VAcceptCallback.java index 70fc38d4cc..706abb0e05 100644 --- a/client/src/com/vaadin/client/ui/dd/VAcceptCallback.java +++ b/client/src/com/vaadin/client/ui/dd/VAcceptCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/VAcceptCriteria.java b/client/src/com/vaadin/client/ui/dd/VAcceptCriteria.java index 7181a11f2a..4bf23cbe7f 100644 --- a/client/src/com/vaadin/client/ui/dd/VAcceptCriteria.java +++ b/client/src/com/vaadin/client/ui/dd/VAcceptCriteria.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/VAcceptCriterion.java b/client/src/com/vaadin/client/ui/dd/VAcceptCriterion.java index db617b874a..5205b9182b 100644 --- a/client/src/com/vaadin/client/ui/dd/VAcceptCriterion.java +++ b/client/src/com/vaadin/client/ui/dd/VAcceptCriterion.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java b/client/src/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java index 6b98f3f16d..1503b1f84d 100644 --- a/client/src/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java +++ b/client/src/com/vaadin/client/ui/dd/VAcceptCriterionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/VAnd.java b/client/src/com/vaadin/client/ui/dd/VAnd.java index 3ed90e04b0..ee4bc94f9e 100644 --- a/client/src/com/vaadin/client/ui/dd/VAnd.java +++ b/client/src/com/vaadin/client/ui/dd/VAnd.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -51,4 +51,4 @@ final public class VAnd extends VAcceptCriterion implements VAcceptCallback { b1 = true; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VContainsDataFlavor.java b/client/src/com/vaadin/client/ui/dd/VContainsDataFlavor.java index 929579b6e2..2ad375fd77 100644 --- a/client/src/com/vaadin/client/ui/dd/VContainsDataFlavor.java +++ b/client/src/com/vaadin/client/ui/dd/VContainsDataFlavor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -30,4 +30,4 @@ final public class VContainsDataFlavor extends VAcceptCriterion { String name = configuration.getStringAttribute("p"); return drag.getTransferable().getDataFlavors().contains(name); } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java b/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java index f44fceb398..4ee19328d6 100644 --- a/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java +++ b/client/src/com/vaadin/client/ui/dd/VDragAndDropManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -31,7 +31,6 @@ import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Event; import com.google.gwt.user.client.Event.NativePreviewEvent; import com.google.gwt.user.client.Event.NativePreviewHandler; -import com.google.gwt.user.client.Timer; import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.Widget; import com.vaadin.client.ApplicationConnection; @@ -340,10 +339,7 @@ public class VDragAndDropManager { .addNativePreviewHandler(defaultDragAndDropEventHandler); if (dragElement != null && dragElement.getParentElement() == null) { - // deferred attaching drag image is on going, we can - // hurry with it now - lazyAttachDragElement.cancel(); - lazyAttachDragElement.run(); + attachDragElement(); } } // just capture something to prevent text selection in IE @@ -365,17 +361,23 @@ public class VDragAndDropManager { deferredStartRegistration = Event .addNativePreviewHandler(new NativePreviewHandler() { + private int startX = Util + .getTouchOrMouseClientX(currentDrag + .getCurrentGwtEvent()); + private int startY = Util + .getTouchOrMouseClientY(currentDrag + .getCurrentGwtEvent()); + @Override public void onPreviewNativeEvent( NativePreviewEvent event) { int typeInt = event.getTypeInt(); if (typeInt == -1 && event.getNativeEvent().getType() - .contains("MSPointer")) { + .toLowerCase().contains("pointer")) { /* - * Ignore MSPointer events, until they are - * properly used (might improve usability on - * touch devices). + * Ignore PointerEvents since IE10 and IE11 send + * also MouseEvents for backwards compatibility. */ return; } @@ -417,13 +419,23 @@ public class VDragAndDropManager { } case Event.ONMOUSEMOVE: case Event.ONTOUCHMOVE: - if (deferredStartRegistration != null) { - deferredStartRegistration.removeHandler(); - deferredStartRegistration = null; + int currentX = Util + .getTouchOrMouseClientX(event + .getNativeEvent()); + int currentY = Util + .getTouchOrMouseClientY(event + .getNativeEvent()); + if (Math.abs(startX - currentX) > 3 + || Math.abs(startY - currentY) > 3) { + if (deferredStartRegistration != null) { + deferredStartRegistration + .removeHandler(); + deferredStartRegistration = null; + } + currentDrag.setCurrentGwtEvent(event + .getNativeEvent()); + startDrag.execute(); } - currentDrag.setCurrentGwtEvent(event - .getNativeEvent()); - startDrag.execute(); break; default: // on any other events, clean up the @@ -712,16 +724,7 @@ public class VDragAndDropManager { updateDragImagePosition(); if (isStarted) { - lazyAttachDragElement.run(); - } else { - /* - * To make our default dnd handler as compatible as possible, we - * need to defer the appearance of dragElement. Otherwise events - * that are derived from sequences of other events might not - * fire as domchanged will fire between them or mouse up might - * happen on dragElement. - */ - lazyAttachDragElement.schedule(300); + attachDragElement(); } } } @@ -730,24 +733,20 @@ public class VDragAndDropManager { return dragElement; } - private final Timer lazyAttachDragElement = new Timer() { - - @Override - public void run() { - if (dragElement != null && dragElement.getParentElement() == null) { - ApplicationConnection connection = getCurrentDragApplicationConnection(); - Element dragImageParent; - if (connection == null) { - VConsole.error("Could not determine ApplicationConnection for current drag operation. The drag image will likely look broken"); - dragImageParent = RootPanel.getBodyElement(); - } else { - dragImageParent = VOverlay.getOverlayContainer(connection); - } - dragImageParent.appendChild(dragElement); + private void attachDragElement() { + if (dragElement != null && dragElement.getParentElement() == null) { + ApplicationConnection connection = getCurrentDragApplicationConnection(); + Element dragImageParent; + if (connection == null) { + VConsole.error("Could not determine ApplicationConnection for current drag operation. The drag image will likely look broken"); + dragImageParent = RootPanel.getBodyElement(); + } else { + dragImageParent = VOverlay.getOverlayContainer(connection); } - + dragImageParent.appendChild(dragElement); } - }; + + } private Command deferredCommand; diff --git a/client/src/com/vaadin/client/ui/dd/VDragEvent.java b/client/src/com/vaadin/client/ui/dd/VDragEvent.java index 9b592cfcbd..6291a38e42 100644 --- a/client/src/com/vaadin/client/ui/dd/VDragEvent.java +++ b/client/src/com/vaadin/client/ui/dd/VDragEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,11 +21,14 @@ import java.util.Map; import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.NativeEvent; +import com.google.gwt.dom.client.Node; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.dom.client.TableElement; import com.google.gwt.dom.client.TableSectionElement; import com.google.gwt.event.dom.client.MouseOverEvent; import com.google.gwt.user.client.DOM; +import com.google.gwt.user.client.Event; +import com.google.gwt.user.client.EventListener; import com.vaadin.client.BrowserInfo; import com.vaadin.client.Util; @@ -241,6 +244,7 @@ public class VDragEvent { public void createDragImage(com.google.gwt.user.client.Element element, boolean alignImageToEvent) { Element cloneNode = (Element) element.cloneNode(true); + syncContent(element, cloneNode); if (BrowserInfo.get().isIE()) { if (cloneNode.getTagName().toLowerCase().equals("tr")) { TableElement table = Document.get().createTableElement(); @@ -277,4 +281,31 @@ public class VDragEvent { createDragImage(DOM.asOld(element), alignImageToEvent); } + /** + * Do additional content sync between <code>original</code> element and its + * <code>copy</code> if needed. + * + * @since 7.2 + * @param original + * original element + * @param copy + * copy of original element + */ + private void syncContent(Element original, Element copy) { + for (int i = 0; i < original.getChildCount(); i++) { + Node child = original.getChild(i); + if (child instanceof Element) { + syncContent((Element) child, (Element) copy.getChild(i)); + } + } + doSyncContent(original, copy); + } + + private void doSyncContent(Element original, Element copy) { + EventListener eventListener = Event.getEventListener(original); + if (eventListener instanceof DragImageModifier) { + ((DragImageModifier) eventListener).modifyDragImage(copy); + } + } + } diff --git a/client/src/com/vaadin/client/ui/dd/VDragEventServerCallback.java b/client/src/com/vaadin/client/ui/dd/VDragEventServerCallback.java index c1f89bd421..ba2d0f789b 100644 --- a/client/src/com/vaadin/client/ui/dd/VDragEventServerCallback.java +++ b/client/src/com/vaadin/client/ui/dd/VDragEventServerCallback.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/VDragSourceIs.java b/client/src/com/vaadin/client/ui/dd/VDragSourceIs.java index 8112a3cf28..8a8d1d7bb9 100644 --- a/client/src/com/vaadin/client/ui/dd/VDragSourceIs.java +++ b/client/src/com/vaadin/client/ui/dd/VDragSourceIs.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -51,4 +51,4 @@ final public class VDragSourceIs extends VAcceptCriterion { } return false; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VDropHandler.java b/client/src/com/vaadin/client/ui/dd/VDropHandler.java index 18fd740c0d..96059883e7 100644 --- a/client/src/com/vaadin/client/ui/dd/VDropHandler.java +++ b/client/src/com/vaadin/client/ui/dd/VDropHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/VHasDropHandler.java b/client/src/com/vaadin/client/ui/dd/VHasDropHandler.java index 40c3cd81e9..4d82c5c9cf 100644 --- a/client/src/com/vaadin/client/ui/dd/VHasDropHandler.java +++ b/client/src/com/vaadin/client/ui/dd/VHasDropHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/VHtml5DragEvent.java b/client/src/com/vaadin/client/ui/dd/VHtml5DragEvent.java index 3615db650f..68987e565f 100644 --- a/client/src/com/vaadin/client/ui/dd/VHtml5DragEvent.java +++ b/client/src/com/vaadin/client/ui/dd/VHtml5DragEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/VHtml5File.java b/client/src/com/vaadin/client/ui/dd/VHtml5File.java index ef74439063..6022835343 100644 --- a/client/src/com/vaadin/client/ui/dd/VHtml5File.java +++ b/client/src/com/vaadin/client/ui/dd/VHtml5File.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/VIsOverId.java b/client/src/com/vaadin/client/ui/dd/VIsOverId.java index 7e2f596a20..8e8abf1a97 100644 --- a/client/src/com/vaadin/client/ui/dd/VIsOverId.java +++ b/client/src/com/vaadin/client/ui/dd/VIsOverId.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -51,4 +51,4 @@ final public class VIsOverId extends VAcceptCriterion { } return false; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VItemIdIs.java b/client/src/com/vaadin/client/ui/dd/VItemIdIs.java index b022f434f4..4bfc71ab14 100644 --- a/client/src/com/vaadin/client/ui/dd/VItemIdIs.java +++ b/client/src/com/vaadin/client/ui/dd/VItemIdIs.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -47,4 +47,4 @@ final public class VItemIdIs extends VAcceptCriterion { } return false; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java b/client/src/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java index 190c7bc504..f67174c1c1 100644 --- a/client/src/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java +++ b/client/src/com/vaadin/client/ui/dd/VLazyInitItemIdentifiers.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -90,4 +90,4 @@ public class VLazyInitItemIdentifiers extends VAcceptCriterion { protected boolean accept(VDragEvent drag, UIDL configuration) { return false; // not used is this implementation } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VNot.java b/client/src/com/vaadin/client/ui/dd/VNot.java index 660a12a275..3e931f9580 100644 --- a/client/src/com/vaadin/client/ui/dd/VNot.java +++ b/client/src/com/vaadin/client/ui/dd/VNot.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -73,4 +73,4 @@ final public class VNot extends VAcceptCriterion { protected boolean accept(VDragEvent drag, UIDL configuration) { return false; // not used } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VOr.java b/client/src/com/vaadin/client/ui/dd/VOr.java index d06337bf35..e189e22b45 100644 --- a/client/src/com/vaadin/client/ui/dd/VOr.java +++ b/client/src/com/vaadin/client/ui/dd/VOr.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -59,4 +59,4 @@ final public class VOr extends VAcceptCriterion implements VAcceptCallback { accepted = true; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VOverTreeNode.java b/client/src/com/vaadin/client/ui/dd/VOverTreeNode.java index 324406be98..c7c00a6bee 100644 --- a/client/src/com/vaadin/client/ui/dd/VOverTreeNode.java +++ b/client/src/com/vaadin/client/ui/dd/VOverTreeNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -28,4 +28,4 @@ final public class VOverTreeNode extends VAcceptCriterion { "itemIdOverIsNode"); return containsKey != null && containsKey.booleanValue(); } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VServerAccept.java b/client/src/com/vaadin/client/ui/dd/VServerAccept.java index 3f40d6455c..9ead6298b0 100644 --- a/client/src/com/vaadin/client/ui/dd/VServerAccept.java +++ b/client/src/com/vaadin/client/ui/dd/VServerAccept.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -48,4 +48,4 @@ final public class VServerAccept extends VAcceptCriterion { protected boolean accept(VDragEvent drag, UIDL configuration) { return false; // not used } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VSourceIsTarget.java b/client/src/com/vaadin/client/ui/dd/VSourceIsTarget.java index 6f4a3b0497..3e453b4105 100644 --- a/client/src/com/vaadin/client/ui/dd/VSourceIsTarget.java +++ b/client/src/com/vaadin/client/ui/dd/VSourceIsTarget.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -34,4 +34,4 @@ final public class VSourceIsTarget extends VAcceptCriterion { return paintable == dragSource; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VTargetDetailIs.java b/client/src/com/vaadin/client/ui/dd/VTargetDetailIs.java index 8d062c8c67..9084d7df89 100644 --- a/client/src/com/vaadin/client/ui/dd/VTargetDetailIs.java +++ b/client/src/com/vaadin/client/ui/dd/VTargetDetailIs.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -48,4 +48,4 @@ final public class VTargetDetailIs extends VAcceptCriterion { } } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java b/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java index c3f56b410d..1641eb30f1 100644 --- a/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java +++ b/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/dd/VTransferable.java b/client/src/com/vaadin/client/ui/dd/VTransferable.java index 18f6369b92..b03dcbcb35 100644 --- a/client/src/com/vaadin/client/ui/dd/VTransferable.java +++ b/client/src/com/vaadin/client/ui/dd/VTransferable.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java b/client/src/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java index f659e72e78..afb521b141 100644 --- a/client/src/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java +++ b/client/src/com/vaadin/client/ui/draganddropwrapper/DragAndDropWrapperConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java b/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java index c6e9e774ee..cd4c79ccc6 100644 --- a/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java +++ b/client/src/com/vaadin/client/ui/embedded/EmbeddedConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -236,4 +236,4 @@ public class EmbeddedConnector extends AbstractComponentConnector implements }; -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/flash/FlashConnector.java b/client/src/com/vaadin/client/ui/flash/FlashConnector.java index e12e1be64d..7d01f6f560 100644 --- a/client/src/com/vaadin/client/ui/flash/FlashConnector.java +++ b/client/src/com/vaadin/client/ui/flash/FlashConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/form/FormConnector.java b/client/src/com/vaadin/client/ui/form/FormConnector.java index f5256adbb2..25046f8b9a 100644 --- a/client/src/com/vaadin/client/ui/form/FormConnector.java +++ b/client/src/com/vaadin/client/ui/form/FormConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java b/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java index 8328e1f0a7..494a1a87ff 100644 --- a/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/formlayout/FormLayoutConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java b/client/src/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java index cc052fa6d5..67220e5c36 100644 --- a/client/src/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/gridlayout/GridLayoutConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -210,4 +210,18 @@ public class GridLayoutConnector extends AbstractComponentContainerConnector public void layoutHorizontally() { getWidget().updateWidth(); } + + @Override + protected void updateWidgetSize(String newWidth, String newHeight) { + // Prevent the element from momentarily shrinking to zero size + // when the size is set to undefined by a state change but before + // it is recomputed in the layout phase. This may affect scroll + // position in some cases; see #13386. + if (!isUndefinedHeight()) { + getWidget().setHeight(newHeight); + } + if (!isUndefinedWidth()) { + getWidget().setWidth(newWidth); + } + } } diff --git a/client/src/com/vaadin/client/ui/image/ImageConnector.java b/client/src/com/vaadin/client/ui/image/ImageConnector.java index d637f56bfd..e4ba4af070 100644 --- a/client/src/com/vaadin/client/ui/image/ImageConnector.java +++ b/client/src/com/vaadin/client/ui/image/ImageConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/label/LabelConnector.java b/client/src/com/vaadin/client/ui/label/LabelConnector.java index 6a04c91562..07defcc64d 100644 --- a/client/src/com/vaadin/client/ui/label/LabelConnector.java +++ b/client/src/com/vaadin/client/ui/label/LabelConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java b/client/src/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java index de3626d846..b323fde1db 100644 --- a/client/src/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java +++ b/client/src/com/vaadin/client/ui/layout/ComponentConnectorLayoutSlot.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/layout/ElementResizeEvent.java b/client/src/com/vaadin/client/ui/layout/ElementResizeEvent.java index 9ad08510a0..a1f75baff4 100644 --- a/client/src/com/vaadin/client/ui/layout/ElementResizeEvent.java +++ b/client/src/com/vaadin/client/ui/layout/ElementResizeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/layout/ElementResizeListener.java b/client/src/com/vaadin/client/ui/layout/ElementResizeListener.java index 8fa6ccc4cc..97ca34a8a4 100644 --- a/client/src/com/vaadin/client/ui/layout/ElementResizeListener.java +++ b/client/src/com/vaadin/client/ui/layout/ElementResizeListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -18,4 +18,4 @@ package com.vaadin.client.ui.layout; public interface ElementResizeListener { public void onElementResize(ElementResizeEvent e); -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/layout/LayoutDependencyTree.java b/client/src/com/vaadin/client/ui/layout/LayoutDependencyTree.java index e148742b0b..ae866e3354 100644 --- a/client/src/com/vaadin/client/ui/layout/LayoutDependencyTree.java +++ b/client/src/com/vaadin/client/ui/layout/LayoutDependencyTree.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/layout/Margins.java b/client/src/com/vaadin/client/ui/layout/Margins.java index cd0cbe79d0..75839c9ce8 100644 --- a/client/src/com/vaadin/client/ui/layout/Margins.java +++ b/client/src/com/vaadin/client/ui/layout/Margins.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/layout/MayScrollChildren.java b/client/src/com/vaadin/client/ui/layout/MayScrollChildren.java index 0588b55303..2a0b821646 100644 --- a/client/src/com/vaadin/client/ui/layout/MayScrollChildren.java +++ b/client/src/com/vaadin/client/ui/layout/MayScrollChildren.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java b/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java index 5c8a627dea..50020e51fe 100644 --- a/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java +++ b/client/src/com/vaadin/client/ui/layout/VLayoutSlot.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -299,4 +299,4 @@ public abstract class VLayoutSlot { public double getExpandRatio() { return expandRatio; } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/link/LinkConnector.java b/client/src/com/vaadin/client/ui/link/LinkConnector.java index c8bbc426e9..cc952525a9 100644 --- a/client/src/com/vaadin/client/ui/link/LinkConnector.java +++ b/client/src/com/vaadin/client/ui/link/LinkConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/listselect/ListSelectConnector.java b/client/src/com/vaadin/client/ui/listselect/ListSelectConnector.java index 0b86b6c226..b867a3358c 100644 --- a/client/src/com/vaadin/client/ui/listselect/ListSelectConnector.java +++ b/client/src/com/vaadin/client/ui/listselect/ListSelectConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/menubar/MenuBar.java b/client/src/com/vaadin/client/ui/menubar/MenuBar.java index 6f0546601a..b00665e766 100644 --- a/client/src/com/vaadin/client/ui/menubar/MenuBar.java +++ b/client/src/com/vaadin/client/ui/menubar/MenuBar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java b/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java index 4ead614275..20cabf9a36 100644 --- a/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java +++ b/client/src/com/vaadin/client/ui/menubar/MenuBarConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/menubar/MenuItem.java b/client/src/com/vaadin/client/ui/menubar/MenuItem.java index 9cad2e976f..bf2fbf8feb 100644 --- a/client/src/com/vaadin/client/ui/menubar/MenuItem.java +++ b/client/src/com/vaadin/client/ui/menubar/MenuItem.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java b/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java index e4e88899eb..6968f59574 100644 --- a/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java +++ b/client/src/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java b/client/src/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java index 1799ba2958..46a8f37122 100644 --- a/client/src/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java +++ b/client/src/com/vaadin/client/ui/nativeselect/NativeSelectConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java index 86e857ac7f..a655635edc 100644 --- a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java +++ b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupBaseConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java index 9b8a38b952..f9bdf455f6 100644 --- a/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java +++ b/client/src/com/vaadin/client/ui/optiongroup/OptionGroupConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java index fbf94f0da3..918b7fbdaa 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -17,6 +17,8 @@ package com.vaadin.client.ui.orderedlayout; import java.util.List; +import com.google.gwt.core.client.Scheduler; +import com.google.gwt.core.client.Scheduler.ScheduledCommand; import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.user.client.ui.Widget; @@ -493,7 +495,15 @@ public abstract class AbstractOrderedLayoutConnector extends updateLayoutHeight(); if (needsExpand()) { getWidget().updateExpandedSizes(); - getWidget().updateExpandCompensation(); + // updateExpandedSizes causes fixed size components to temporarily + // lose their size. updateExpandCompensation must be delayed until + // the browser has a chance to measure them. + Scheduler.get().scheduleFinally(new ScheduledCommand() { + @Override + public void execute() { + getWidget().updateExpandCompensation(); + } + }); } else { getWidget().clearExpand(); } diff --git a/client/src/com/vaadin/client/ui/orderedlayout/CaptionPosition.java b/client/src/com/vaadin/client/ui/orderedlayout/CaptionPosition.java index 57f85b9e23..885dc1ecd7 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/CaptionPosition.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/CaptionPosition.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -21,4 +21,4 @@ package com.vaadin.client.ui.orderedlayout; */ public enum CaptionPosition { TOP, RIGHT, BOTTOM, LEFT -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java index 87888bddae..2cd1acd78b 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/HorizontalLayoutConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/orderedlayout/Slot.java b/client/src/com/vaadin/client/ui/orderedlayout/Slot.java index 03038eefd3..b1d7dd2804 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/Slot.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/Slot.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -766,4 +766,4 @@ public final class Slot extends SimplePanel { return hasRelativeWidth(); } } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java b/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java index 4a1dae9b95..01c44d6180 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java index 932327653a..33ff020e89 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/VerticalLayoutConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/panel/PanelConnector.java b/client/src/com/vaadin/client/ui/panel/PanelConnector.java index f2e73bae80..11111df602 100644 --- a/client/src/com/vaadin/client/ui/panel/PanelConnector.java +++ b/client/src/com/vaadin/client/ui/panel/PanelConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java b/client/src/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java index e8ed6c1113..61576fac04 100644 --- a/client/src/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java +++ b/client/src/com/vaadin/client/ui/passwordfield/PasswordFieldConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/popupview/PopupViewConnector.java b/client/src/com/vaadin/client/ui/popupview/PopupViewConnector.java index 2f53280c99..bde5f6a051 100644 --- a/client/src/com/vaadin/client/ui/popupview/PopupViewConnector.java +++ b/client/src/com/vaadin/client/ui/popupview/PopupViewConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -97,11 +97,9 @@ public class PopupViewConnector extends AbstractHasComponentsConnector public void onConnectorHierarchyChange( ConnectorHierarchyChangeEvent connectorHierarchyChangeEvent) { // Render the popup if visible and show it. - if (!getChildren().isEmpty()) { + if (!getChildComponents().isEmpty()) { getWidget().preparePopup(getWidget().popup); - getWidget().popup - .setPopupConnector((ComponentConnector) getChildren() - .get(0)); + getWidget().popup.setPopupConnector(getChildComponents().get(0)); if (ComponentStateUtil.hasStyles(getState())) { final StringBuffer styleBuf = new StringBuffer(); final String primaryName = getWidget().popup diff --git a/client/src/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java b/client/src/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java index a14cac3808..8db2d1cb85 100644 --- a/client/src/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java +++ b/client/src/com/vaadin/client/ui/popupview/VisibilityChangeEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/popupview/VisibilityChangeHandler.java b/client/src/com/vaadin/client/ui/popupview/VisibilityChangeHandler.java index 545beddcc2..3c5e09d1fc 100644 --- a/client/src/com/vaadin/client/ui/popupview/VisibilityChangeHandler.java +++ b/client/src/com/vaadin/client/ui/popupview/VisibilityChangeHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java b/client/src/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java index 91f3da5323..3a83430f7a 100644 --- a/client/src/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java +++ b/client/src/com/vaadin/client/ui/progressindicator/ProgressBarConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -53,4 +53,4 @@ public class ProgressBarConnector extends AbstractFieldConnector { return (VProgressBar) super.getWidget(); } -}
\ No newline at end of file +} diff --git a/client/src/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java b/client/src/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java index 23b71868e0..36bb1dd6b2 100644 --- a/client/src/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java +++ b/client/src/com/vaadin/client/ui/progressindicator/ProgressIndicatorConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java b/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java index a19e931713..6b3bf84578 100644 --- a/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java +++ b/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/richtextarea/VRichTextToolbar.java b/client/src/com/vaadin/client/ui/richtextarea/VRichTextToolbar.java index dc7d456427..2e0554c499 100644 --- a/client/src/com/vaadin/client/ui/richtextarea/VRichTextToolbar.java +++ b/client/src/com/vaadin/client/ui/richtextarea/VRichTextToolbar.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/slider/SliderConnector.java b/client/src/com/vaadin/client/ui/slider/SliderConnector.java index b4eb9f14f7..1e5120ce76 100644 --- a/client/src/com/vaadin/client/ui/slider/SliderConnector.java +++ b/client/src/com/vaadin/client/ui/slider/SliderConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java b/client/src/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java index 45535de3de..ce8b3c8fea 100644 --- a/client/src/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java +++ b/client/src/com/vaadin/client/ui/splitpanel/AbstractSplitPanelConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java b/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java index 9cc79db77f..75389b6cc4 100644 --- a/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java +++ b/client/src/com/vaadin/client/ui/splitpanel/HorizontalSplitPanelConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java b/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java index 05e06b2609..e95f7143ba 100644 --- a/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java +++ b/client/src/com/vaadin/client/ui/splitpanel/VerticalSplitPanelConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/table/TableConnector.java b/client/src/com/vaadin/client/ui/table/TableConnector.java index 610f2f8010..bea49e5f27 100644 --- a/client/src/com/vaadin/client/ui/table/TableConnector.java +++ b/client/src/com/vaadin/client/ui/table/TableConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -303,9 +303,13 @@ public class TableConnector extends AbstractHasComponentsConnector implements getWidget().tabIndex = getState().tabIndex; getWidget().setProperTabIndex(); - if (getWidget().initializedAndAttached) { - getWidget().resizeSortedColumnForSortIndicator(); - } + Scheduler.get().scheduleFinally(new ScheduledCommand() { + + @Override + public void execute() { + getWidget().resizeSortedColumnForSortIndicator(); + } + }); // Remember this to detect situations where overflow hack might be // needed during scrolling diff --git a/client/src/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java b/client/src/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java index 30c9e47c6e..9de415e74e 100644 --- a/client/src/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java +++ b/client/src/com/vaadin/client/ui/tabsheet/TabsheetBaseConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java b/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java index b472300c21..4296ab54a7 100644 --- a/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java +++ b/client/src/com/vaadin/client/ui/tabsheet/TabsheetConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -176,7 +176,11 @@ public class TabsheetConnector extends TabsheetBaseConnector implements * (Re-)render the content of the active tab. */ protected void renderContent() { - ComponentConnector contentConnector = getChildComponents().get(0); + ComponentConnector contentConnector = null; + if (!getChildComponents().isEmpty()) { + contentConnector = getChildComponents().get(0); + } + if (null != contentConnector) { getWidget().renderContent(contentConnector.getWidget()); } else { diff --git a/client/src/com/vaadin/client/ui/textarea/TextAreaConnector.java b/client/src/com/vaadin/client/ui/textarea/TextAreaConnector.java index 5cfc309e5b..e406ff5459 100644 --- a/client/src/com/vaadin/client/ui/textarea/TextAreaConnector.java +++ b/client/src/com/vaadin/client/ui/textarea/TextAreaConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java b/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java index e2ede121b6..42b045005f 100644 --- a/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java +++ b/client/src/com/vaadin/client/ui/textfield/TextFieldConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/tree/TreeConnector.java b/client/src/com/vaadin/client/ui/tree/TreeConnector.java index 8b09c10ad3..c57430b3b4 100644 --- a/client/src/com/vaadin/client/ui/tree/TreeConnector.java +++ b/client/src/com/vaadin/client/ui/tree/TreeConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java b/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java index 4f62f0df89..5a42484b28 100644 --- a/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java +++ b/client/src/com/vaadin/client/ui/treetable/TreeTableConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -48,7 +48,12 @@ public class TreeTableConnector extends TableConnector { .getIntAttribute(TreeTableConstants.ATTRIBUTE_HIERARCHY_COLUMN_INDEX) : 0; int oldTotalRows = getWidget().getTotalRows(); + super.updateFromUIDL(uidl, client); + // super.updateFromUIDL set rendering to false, even though we continue + // rendering here. Set it back to true. + getWidget().rendering = true; + if (getWidget().collapseRequest) { if (getWidget().collapsedRowKey != null && getWidget().scrollBody != null) { @@ -105,6 +110,7 @@ public class TreeTableConnector extends TableConnector { getWidget() .handleNavigation(event.keycode, event.ctrl, event.shift); } + getWidget().rendering = false; } @Override diff --git a/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java b/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java index 72794d08f1..0994ac15c3 100644 --- a/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java +++ b/client/src/com/vaadin/client/ui/twincolselect/TwinColSelectConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/ui/UIConnector.java b/client/src/com/vaadin/client/ui/ui/UIConnector.java index 576f50d018..1d2a49cbd1 100644 --- a/client/src/com/vaadin/client/ui/ui/UIConnector.java +++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/upload/UploadConnector.java b/client/src/com/vaadin/client/ui/upload/UploadConnector.java index 03f1a2802c..87e97bc675 100644 --- a/client/src/com/vaadin/client/ui/upload/UploadConnector.java +++ b/client/src/com/vaadin/client/ui/upload/UploadConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategy.java b/client/src/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategy.java index 20c1368017..2c2e10594d 100644 --- a/client/src/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategy.java +++ b/client/src/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategyIE.java b/client/src/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategyIE.java index 6a38c8986b..0c114e2ee7 100644 --- a/client/src/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategyIE.java +++ b/client/src/com/vaadin/client/ui/upload/UploadIFrameOnloadStrategyIE.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/video/VideoConnector.java b/client/src/com/vaadin/client/ui/video/VideoConnector.java index 6098cf63d6..de53368d6a 100644 --- a/client/src/com/vaadin/client/ui/video/VideoConnector.java +++ b/client/src/com/vaadin/client/ui/video/VideoConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/window/WindowConnector.java b/client/src/com/vaadin/client/ui/window/WindowConnector.java index 07015e7fbe..5c8f5e2d2d 100644 --- a/client/src/com/vaadin/client/ui/window/WindowConnector.java +++ b/client/src/com/vaadin/client/ui/window/WindowConnector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -15,6 +15,8 @@ */ package com.vaadin.client.ui.window; +import java.util.logging.Logger; + import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.NativeEvent; import com.google.gwt.dom.client.Style; @@ -256,6 +258,12 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector @Override public void postLayout() { VWindow window = getWidget(); + + if (!window.isAttached()) { + Logger.getLogger(WindowConnector.class.getName()).warning( + "Called postLayout to detached Window."); + return; + } if (window.centered && getState().windowMode != WindowMode.MAXIMIZED) { window.center(); } diff --git a/client/src/com/vaadin/client/ui/window/WindowMoveEvent.java b/client/src/com/vaadin/client/ui/window/WindowMoveEvent.java index 439a90e3a1..add7ee740f 100644 --- a/client/src/com/vaadin/client/ui/window/WindowMoveEvent.java +++ b/client/src/com/vaadin/client/ui/window/WindowMoveEvent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/client/src/com/vaadin/client/ui/window/WindowMoveHandler.java b/client/src/com/vaadin/client/ui/window/WindowMoveHandler.java index e30e1853fe..0ac348af68 100644 --- a/client/src/com/vaadin/client/ui/window/WindowMoveHandler.java +++ b/client/src/com/vaadin/client/ui/window/WindowMoveHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of |